54d20ff76c09024ba6c0dc51e51da77f38956828
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / shairport-sync / S99shairport-sync
1 #! /bin/sh
2
3 # Additional options that are passed to Shairport Sync
4 OPTIONS="-d"
5
6 case "$1" in
7     start)
8         echo -n "Starting shairport-sync: "
9         start-stop-daemon -S -q -p /var/run/shairport-sync.pid --exec /usr/bin/shairport-sync -- $OPTIONS
10         [ $? = 0 ] && echo "OK" || echo "FAIL"
11         ;;
12     stop)
13         echo -n "Stopping shairport-sync: "
14         start-stop-daemon -K -q -p /var/run/shairport-sync.pid
15         [ $? = 0 ] && echo "OK" || echo "FAIL"
16         ;;
17     restart)
18         $0 stop
19         $0 start
20         ;;
21     *)
22         echo "Usage: $0 {start|stop|restart}"
23         exit 1
24         ;;
25 esac