]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
tvheadend: Add initscript
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 2 Dec 2017 13:06:34 +0000 (13:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 4 Mar 2024 22:08:29 +0000 (22:08 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/packages/tvheadend
lfs/tvheadend
src/initscripts/packages/tvheadend [new file with mode: 0755]

index 2fb537d9d1437a6eb5c921f10aab7351db10c1ff..d6711f68905c8b3b0c7fa8f0105c4ab66c44cddc 100644 (file)
@@ -1,3 +1,4 @@
+etc/rc.d/init.d/tvheadend
 usr/bin/tvheadend
 usr/share/tvheadend
 #usr/share/tvheadend/data
index a771d4641392c0e85d0e5ff98c1731edceb7396f..8248f21febaecbab6bf09203a994a4f94cf17903 100644 (file)
@@ -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 (executable)
index 0000000..14e25bd
--- /dev/null
@@ -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