package/shairport-sync: fix init script
authorJörg Krause <jkrause@posteo.de>
Wed, 12 Nov 2014 23:06:26 +0000 (00:06 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 19 Nov 2014 21:50:19 +0000 (22:50 +0100)
shairport-sync uses libdaemon for running as daemon and creating the pidfile
which conflicts with start-stop-daemons `-b -m` options. For that reason
shairport-sync does not start using /etc/init.d/S99shairport-sync start.

The issue is fixed by removing the background and pidfile task from
start-stop-daemon and add a daemon option `-d` to shairport-sync.

Signed-off-by: Jörg Krause <jkrause@posteo.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/shairport-sync/S99shairport-sync

index 31359fc25ea4ec577cde5e2039bf869130ad9e10..54d20ff76c09024ba6c0dc51e51da77f38956828 100644 (file)
@@ -1,12 +1,12 @@
 #! /bin/sh
 
 # Additional options that are passed to Shairport Sync
-OPTIONS=""
+OPTIONS="-d"
 
 case "$1" in
     start)
        echo -n "Starting shairport-sync: "
-       start-stop-daemon -S -q -m -b -p /var/run/shairport-sync.pid --exec /usr/bin/shairport-sync -- $OPTIONS
+       start-stop-daemon -S -q -p /var/run/shairport-sync.pid --exec /usr/bin/shairport-sync -- $OPTIONS
        [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
     stop)