shairport-sync: Add initscript

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2018-11-11 18:55:35 +00:00
parent b7dbcd158d
commit 6dc7b04bea
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/shairport-sync
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Starting Shairport Sync..."
loadproc /usr/bin/shairport-sync --daemon
;;
stop)
boot_mesg "Stopping Shairport Sync..."
killproc /usr/bin/shairport-sync
;;
reload)
boot_mesg "Reloading Shairport Sync..."
reloadproc /usr/bin/shairport-sync
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/bin/shairport-sync
;;
*)
echo "Usage: ${0} {start|stop|reload|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/shairport-sync