[SCM] mpd-sima/master: Add systemd service

kaliko-guest at users.alioth.debian.org kaliko-guest at users.alioth.debian.org
Sun Sep 28 11:34:27 UTC 2014


The following commit has been merged in the master branch:
commit 937d938abb8f496a702af8bc19cf0a21fe764d61
Author: Geoffroy Youri Berret <efrim at azylum.org>
Date:   Sat Sep 27 19:26:05 2014 +0200

    Add systemd service

diff --git a/debian/changelog b/debian/changelog
index 9a4ab4f..226e7af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,11 @@
-mpd-sima (0.12.2-1~0) UNRELEASED; urgency=low
+mpd-sima (0.12.2-1~1) UNRELEASED; urgency=low
 
   * python3 convertion, major package refactoring
   * Migrate to dh-python
   * Bumped Standards-Version to 3.9.5
   * Add pgpsigurlmangle for uscan
   * Depends on musicpd and requests
+  * Add service file (systemd)
 
  -- Geoffroy Youri Berret <efrim at azylum.org>  Sat, 08 Feb 2014 17:42:52 +0100
 
diff --git a/debian/control b/debian/control
index 287df52..e534205 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,9 @@ Section: sound
 Priority: optional
 Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers at lists.alioth.debian.org>
 Uploaders: Geoffroy Youri Berret <efrim at azylum.org>
-Build-Depends: debhelper (>= 9), python3, python3-setuptools (>= 2.0.2), dh-python
+Build-Depends: debhelper (>= 9), python3, python3-setuptools (>= 2.0.2),
+    dh-python,
+    dh-systemd (>= 1.5)
 Build-Depends-Indep: bash-completion
 X-Python3-Version: >=3.2
 Standards-Version: 3.9.5
diff --git a/debian/copyright b/debian/copyright
index cbaf807..786254d 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -8,7 +8,7 @@ Source: <http://codingteam.net/project/sima/download>
  http://codingteam.net/project/sima/download
 
 Files: *
-Copyright: Copyright 2009-2014 Jack Kaliko <efrim at azylum.org>
+Copyright: Copyright 2009-2014 Jack Kaliko <kaliko at azylum.org>
            Copyright 2010 Eric Casteleijn <thisfred at gmail.com>
            Copyright 2007, 2009 Sander Marechal <s.marechal at jejik.com>
            Copyright 2008 Rick van Hattem
diff --git a/debian/mpd-sima.service b/debian/mpd-sima.service
new file mode 100644
index 0000000..4d342a2
--- /dev/null
+++ b/debian/mpd-sima.service
@@ -0,0 +1,23 @@
+[Unit]
+Description=MPD_sima autoqueue utility
+After=network.target
+ConditionPathExists=!/etc/mpd-sima_not_to_be_run
+
+[Service]
+User=mpd-sima
+EnvironmentFile=-/etc/default/mpd-sima
+Type=forking
+# TODO: how to ensure /run/mpd-sima existence? ExecStartPre=?, RuntimeDirectory=? or tmpfiles.d?
+# Run ExecStartPre with root-permissions
+PermissionsStartOnly=true
+ExecStartPre=/bin/mkdir -p -m 755 /run/mpd-sima
+ExecStartPre=/bin/chown -R mpd-sima /run/mpd-sima
+PIDFile=/run/mpd-sima/pid
+ExecStart=/usr/bin/mpd-sima --daemon --var_dir=/var/lib/mpd-sima/ --pid=/run/mpd-sima/pid --config=/etc/mpd-sima.cfg --daemon
+#ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+#Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+#Alias=mpd-sima.service
diff --git a/debian/rules b/debian/rules
index 759fafe..9f8357b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,7 @@
 #
 
 %:
-	dh $@ --with bash_completion,python3 --buildsystem=pybuild
+	dh $@ --with bash_completion,python3,systemd --buildsystem=pybuild
 
 #override_dh_installchangelogs:
 #	dh_installchangelogs doc/Changelog

-- 
mpd-sima packaging



More information about the pkg-multimedia-commits mailing list