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 | |
parent | 257e3ec2a1c74cbb9f2ebb5fb79770c5593fefb6 (diff) |
add startup script for tvheadend
Diffstat (limited to 'package')
-rw-r--r-- | package/tvheadend/Makefile | 2 | ||||
-rw-r--r-- | package/tvheadend/files/tvheadend.init | 29 | ||||
-rw-r--r-- | package/tvheadend/files/tvheadend.postinst | 3 |
3 files changed, 33 insertions, 1 deletions
diff --git a/package/tvheadend/Makefile b/package/tvheadend/Makefile index 42816fad8..d3a357755 100644 --- a/package/tvheadend/Makefile +++ b/package/tvheadend/Makefile @@ -5,7 +5,7 @@ include $(ADK_TOPDIR)/rules.mk PKG_NAME:= tvheadend PKG_VERSION:= 679b7797128b8979145dc2a0a3c54ea513a0466b -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_DESCR:= tv streaming server PKG_SECTION:= mm/video PKG_BUILDDEP:= openssl 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 |