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

@@ -1,3 +1,4 @@
etc/rc.d/init.d/shairport-sync
etc/shairport-sync.conf
#etc/shairport-sync.conf.sample
usr/bin/shairport-sync

View File

@@ -92,5 +92,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
install -v -m 644 $(DIR_SRC)/config/backup/includes/shairport-sync \
/var/ipfire/backup/addons/includes/shairport-sync
# Initscript
$(call INSTALL_INITSCRIPT,shairport-sync)
@rm -rf $(DIR_APP)
@$(POSTBUILD)

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