From: Michael Tremer Date: Sun, 11 Nov 2018 18:55:35 +0000 (+0000) Subject: shairport-sync: Add initscript X-Git-Tag: v2.21-core126~52 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=6dc7b04bead7bdeba8607377fff453c2f2cb94f2 shairport-sync: Add initscript Signed-off-by: Michael Tremer --- diff --git a/config/rootfiles/packages/shairport-sync b/config/rootfiles/packages/shairport-sync index d7c2e11d6e..a0cd5c859c 100644 --- a/config/rootfiles/packages/shairport-sync +++ b/config/rootfiles/packages/shairport-sync @@ -1,3 +1,4 @@ +etc/rc.d/init.d/shairport-sync etc/shairport-sync.conf #etc/shairport-sync.conf.sample usr/bin/shairport-sync diff --git a/lfs/shairport-sync b/lfs/shairport-sync index 2894c7aed7..7703adc9f6 100644 --- a/lfs/shairport-sync +++ b/lfs/shairport-sync @@ -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) diff --git a/src/initscripts/packages/shairport-sync b/src/initscripts/packages/shairport-sync new file mode 100755 index 0000000000..a5d81a99da --- /dev/null +++ b/src/initscripts/packages/shairport-sync @@ -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