[SCM] mpd-sima/master: Fixed a minor issue chmoding pid file

kaliko-guest at users.alioth.debian.org kaliko-guest at users.alioth.debian.org
Thu Mar 7 08:27:08 UTC 2013


The following commit has been merged in the master branch:
commit 9dc5fadc91d2a0db8733b474374e7675c96fc881
Author: Geoffroy Youri Berret <efrim at azylum.org>
Date:   Thu Mar 7 09:19:47 2013 +0100

    Fixed a minor issue chmoding pid file
    
    If the daemon fail to start for some reason, the pid file is absent.
    
    Also removed useless PIDDIR creation in start function.
    
    Git-Dch: Ignore

diff --git a/debian/mpd-sima.init b/debian/mpd-sima.init
index b0f500d..444633f 100755
--- a/debian/mpd-sima.init
+++ b/debian/mpd-sima.init
@@ -81,20 +81,13 @@ do_start()
         exit 0
     fi
 
-    # Controling presence of $PIDDIR
-    PIDDIR=$(dirname "$PIDFILE")
-    if [ ! -d "$PIDDIR" ]; then
-        mkdir -m 0755 $PIDDIR
-        chown $USER:$USER $PIDDIR
-    fi
-
     # Controling presence of $VARDIR
     if [ ! -d "$VARDIR" ]; then
         mkdir -m 0775 $VARDIR
         chown $USER:$USER $VARDIR
     fi
     start-stop-daemon --start --chuid $USER --quiet --exec $DAEMON -- $DAEMON_ARGS || return 2
-    chown $USER $PIDFILE
+    [ -e "$PIDFILE" ] && chown $USER $PIDFILE
     return 0
 }
 

-- 
mpd-sima packaging



More information about the pkg-multimedia-commits mailing list