From: Michael Tremer Date: Sat, 2 Dec 2017 13:06:34 +0000 (+0000) Subject: tvheadend: Add initscript X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d7fecae6694637da755177c8d5149468caaae14;p=people%2Fms%2Fipfire-2.x.git tvheadend: Add initscript Signed-off-by: Michael Tremer --- diff --git a/config/rootfiles/packages/tvheadend b/config/rootfiles/packages/tvheadend index 2fb537d9d..d6711f689 100644 --- a/config/rootfiles/packages/tvheadend +++ b/config/rootfiles/packages/tvheadend @@ -1,3 +1,4 @@ +etc/rc.d/init.d/tvheadend usr/bin/tvheadend usr/share/tvheadend #usr/share/tvheadend/data diff --git a/lfs/tvheadend b/lfs/tvheadend index a771d4641..8248f21fe 100644 --- a/lfs/tvheadend +++ b/lfs/tvheadend @@ -108,7 +108,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && make install # Install initscript - #$(call INSTALL_INITSCRIPT,tvheadend) + $(call INSTALL_INITSCRIPT,tvheadend) @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/initscripts/packages/tvheadend b/src/initscripts/packages/tvheadend new file mode 100755 index 000000000..14e25bda1 --- /dev/null +++ b/src/initscripts/packages/tvheadend @@ -0,0 +1,42 @@ +#!/bin/sh +######################################################################## +# Begin $rc_base/init.d/tvheadend +######################################################################## + +. /etc/sysconfig/rc +. ${rc_functions} + +case "${1}" in + start) + boot_mesg "Starting Tvheadend..." + loadproc /usr/bin/tvheadend --firstrun --fork \ + -c /etc/tvheadend -u nobody -g video + ;; + + stop) + boot_mesg "Stopping Tvheadend..." + killproc /usr/bin/tvheadend + ;; + + reload) + boot_mesg "Reloading Tvheadend..." + reloadproc /usr/bin/tvheadend + ;; + + restart) + ${0} stop + sleep 1 + ${0} start + ;; + + status) + statusproc /usr/bin/tvheadend + ;; + + *) + echo "Usage: ${0} {start|stop|reload|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/tvheadend