[SCM] mpd-sima/master: A much simpler systemd/service file

kaliko-guest at users.alioth.debian.org kaliko-guest at users.alioth.debian.org
Thu Jan 29 14:14:37 UTC 2015


The following commit has been merged in the master branch:
commit a71841d18d99caee4ce0759d21cc59bf5c75f8ce
Author: Geoffroy Youri Berret <efrim at azylum.org>
Date:   Wed Jan 28 17:19:25 2015 +0100

    A much simpler systemd/service file
    
    Git-Dch: Ignore

diff --git a/debian/mpd-sima.default b/debian/mpd-sima.default
index dfbe71a..ab66fb1 100644
--- a/debian/mpd-sima.default
+++ b/debian/mpd-sima.default
@@ -2,5 +2,8 @@
 ## systems.  Comment and change values as needed.
 
 ## Change this to prevent mpd-sima from being started at startup
+## NOTA BENE:
+## only works with SysV init
+## With systemd init: "touch /etc/mpd-sima_not_to_be_run" to prevent mpd-sima from being started
 START_MPD_SIMA=true
 
diff --git a/debian/mpd-sima.init b/debian/mpd-sima.init
index 7f9e63b..4976965 100755
--- a/debian/mpd-sima.init
+++ b/debian/mpd-sima.init
@@ -90,7 +90,7 @@ do_stop()
 {
     log_daemon_msg "Stopping $DESC" "$NAME "
     if !([ -w $PIDFILE ])
-    then 
+    then
         log_warning_msg "PID file not found"
         return 0
     fi
diff --git a/debian/mpd-sima.service b/debian/mpd-sima.service
index 4d342a2..f6eb831 100644
--- a/debian/mpd-sima.service
+++ b/debian/mpd-sima.service
@@ -6,18 +6,11 @@ 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
+Type=simple
+ExecStart=/usr/bin/mpd-sima --var_dir=/var/lib/mpd-sima/ --config=/etc/mpd-sima.cfg
 #ExecReload=/bin/kill -HUP $MAINPID
 KillMode=process
 #Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target
-#Alias=mpd-sima.service

-- 
mpd-sima packaging



More information about the pkg-multimedia-commits mailing list