aboutsummaryrefslogtreecommitdiffstats
path: root/testing/spreed-webrtc/spreed-webrtc.initd
blob: 5ab0efd22bc355fa6e52d9e8391681bd1554aabd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/sbin/openrc-run

command=/usr/sbin/spreed-webrtc-server
pidfile=/var/run/spreed-webrtc/${SVCNAME}.pid
conf=/etc/spreed-webrtc/${SVCNAME}.conf
logfile=/var/log/spreed-webrtc/spreed-webrtc-server.log

: ${exec_user:=spreed}
: ${exec_group:=spreed}

start_stop_daemon_args="--user $exec_user --group $exec_group --background --make-pidfile"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath --directory ${pidfile%/*} --owner ${exec_user}:${exec_group}
	command_args="-c $conf -l $logfile"
}