From ea9124e99bfc760d5921b253c3df7e05bae2c7ca Mon Sep 17 00:00:00 2001 From: codestation Date: Thu, 12 Mar 2015 20:50:01 -0430 Subject: [PATCH] Added preliminar qcma_cli systemd unit file. --- systemd/user/dbus.service | 11 +++++++++++ systemd/user/dbus.socket | 9 +++++++++ systemd/user/qcma.service | 12 ++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 systemd/user/dbus.service create mode 100644 systemd/user/dbus.socket create mode 100644 systemd/user/qcma.service diff --git a/systemd/user/dbus.service b/systemd/user/dbus.service new file mode 100644 index 0000000..9e085a0 --- /dev/null +++ b/systemd/user/dbus.service @@ -0,0 +1,11 @@ +[Unit] +Description=D-Bus User Message Bus +Documentation=man:dbus-daemon(1) +Requires=dbus.socket + +[Service] +ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork --systemd-activation +ExecReload=/usr/bin/dbus-send --print-reply --session --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig + +[Install] +Also=dbus.socket diff --git a/systemd/user/dbus.socket b/systemd/user/dbus.socket new file mode 100644 index 0000000..77958f7 --- /dev/null +++ b/systemd/user/dbus.socket @@ -0,0 +1,9 @@ +[Unit] +Description=D-Bus User Message Bus Socket + +[Socket] +ListenStream=%t/bus + +[Install] +WantedBy=sockets.target +Also=dbus.service diff --git a/systemd/user/qcma.service b/systemd/user/qcma.service new file mode 100644 index 0000000..701c737 --- /dev/null +++ b/systemd/user/qcma.service @@ -0,0 +1,12 @@ +[Unit] +Description="Qcma daemon" +Documentation=man:qcma_cli(6) +ConditionPathExists=%h/.config/codestation/qcma.conf + +[Service] +ExecStart=/usr/bin/qcma_cli --verbose +ExecStop=/usr/bin/dbus-send --print-reply --session --type=method_call --dest=org.qcma.HeadlessManager /HeadlessManager org.qcma.HeadlessManager.stop + +[Install] +Alias=qcma_cli.service +WantedBy=default.target