fixup initscript for tvheadend
[openadk.git] / package / tvheadend / files / tvheadend.init
blob4713d8109c0a8e3b3cab9bf92057beeb8c53419b
1 #!/bin/sh
2 #PKG tvheadend
3 #INIT 90
5 . /etc/rc.conf
7 case $1 in
8 autostop) ;;
9 autostart)
10 test x"${tvheadend:-NO}" = x"NO" && exit 0
11 test x"$tvheadend" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
12 exec sh $0 start
14 start)
15 /usr/bin/tvheadend --noacl &
17 stop)
18 kill $(pgrep -f /usr/bin/tvheadend)
20 restart)
21 sh $0 stop
22 sh $0 start
25 echo "Usage: $0 {start | stop | restart}"
26 exit 1
28 esac
29 exit $?