mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
32 lines
585 B
Text
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
|
|
}
|