mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
shairport-sync: Add initscript
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
etc/rc.d/init.d/shairport-sync
|
||||
etc/shairport-sync.conf
|
||||
#etc/shairport-sync.conf.sample
|
||||
usr/bin/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)
|
||||
|
||||
41
src/initscripts/packages/shairport-sync
Executable file
41
src/initscripts/packages/shairport-sync
Executable 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
|
||||
Reference in New Issue
Block a user