aboutsummaryrefslogtreecommitdiffstats
path: root/community/tvheadend/tvheadend.initd
blob: 90ae77e2580d307eed63e6b4fd8c31d2af740f02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/sbin/openrc-run

name="Tvheadend"
supervisor=supervise-daemon
log_file="/var/log/tvheadend/tvheadend.log"
supervise_daemon_args="--stdout $log_file --stderr $log_file"
command="/usr/bin/tvheadend"
command_args="-c /etc/tvheadend $TVH_ARGS"
command_user="tvheadend:video"
pidfile=/run/tvheadend.pid

depend() {
	use logger dns
	need net
	after firewall
}

start_pre() {
	if [ ! -f /etc/tvheadend/config ]; then
		ewarn "No configuration found!"
		ewarn "Configure tvheadend and setup a user via web interface and restart this service!"
		command_args="$command_args --firstrun"
	fi
}