2014-10-25 00:55:41 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
# Additional options that are passed to Shairport Sync
|
2014-11-13 00:06:26 +01:00
|
|
|
OPTIONS="-d"
|
2014-10-25 00:55:41 +02:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
echo -n "Starting shairport-sync: "
|
2014-11-13 00:06:26 +01:00
|
|
|
start-stop-daemon -S -q -p /var/run/shairport-sync.pid --exec /usr/bin/shairport-sync -- $OPTIONS
|
2014-10-26 18:41:43 +01:00
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
2014-10-25 00:55:41 +02:00
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
echo -n "Stopping shairport-sync: "
|
|
|
|
start-stop-daemon -K -q -p /var/run/shairport-sync.pid
|
2014-10-26 18:41:43 +01:00
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
2014-10-25 00:55:41 +02:00
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
$0 start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|