1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 03:35:38 +03:00
aports/testing/tvheadend-git/tvheadend-git.initd
2013-01-27 10:12:24 +00:00

32 lines
585 B
Text

#!/sbin/runscript
depend() {
need net
}
start() {
ebegin "Starting tvheadend"
checkconf || return 1
start-stop-daemon --start \
--exec ${TVHBIN} -- \
-C -f -u ${TVHUSER} \
-c ${TVHCONF}
eend $?
}
stop() {
ebegin "Stopping tvheadend"
start-stop-daemon --stop --quiet \
--retry TERM/30/KILL/5 \
--pidfile /var/run/tvheadend.pid
eend $?
}
checkconf() {
if [ ! -d "$TVHCONF" ]; then
eerror "config directory does not exist!"
return 1
fi
}