diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-06-03 16:51:36 -0500 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-06-03 16:54:20 -0500 |
commit | 55121d8bb930588b1b711435a457a510b9a778a9 (patch) | |
tree | 0d1aa2d3404478e1f205efdacc6b34f7ceca8d9f /package/tvheadend/files | |
parent | 257e3ec2a1c74cbb9f2ebb5fb79770c5593fefb6 (diff) |
add startup script for tvheadend
Diffstat (limited to 'package/tvheadend/files')
-rw-r--r-- | package/tvheadend/files/tvheadend.init | 29 | ||||
-rw-r--r-- | package/tvheadend/files/tvheadend.postinst | 3 |
2 files changed, 32 insertions, 0 deletions
diff --git a/package/tvheadend/files/tvheadend.init b/package/tvheadend/files/tvheadend.init new file mode 100644 index 000000000..f3e3e396f --- /dev/null +++ b/package/tvheadend/files/tvheadend.init @@ -0,0 +1,29 @@ +#!/bin/sh +#PKG tvheadend +#INIT 90 + +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${tvheadend:-NO}" = x"NO" && exit 0 + test x"$tvheadend" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start + exec sh $0 start + ;; +start) + tvheadend & + ;; +stop) + kill $(pgrep -f /usr/bin/tvheadend) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/tvheadend/files/tvheadend.postinst b/package/tvheadend/files/tvheadend.postinst new file mode 100644 index 000000000..66d1cdff0 --- /dev/null +++ b/package/tvheadend/files/tvheadend.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf tvheadend NO |