cd $(DIR_APP) && make install
# Install initscript
- #$(call INSTALL_INITSCRIPT,tvheadend)
+ $(call INSTALL_INITSCRIPT,tvheadend)
@rm -rf $(DIR_APP)
@$(POSTBUILD)
--- /dev/null
+#!/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