aboutsummaryrefslogtreecommitdiffstats
path: root/community/opentracker/opentracker.initd
blob: 2c6fe9c9c6f2586239705a482c3c1cefcbe04677 (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
26
27
28
29
30
31
32
33
34
35
36
#!/sbin/openrc-run

name=$RC_SVCNAME
daemon=/usr/bin/$name
conf=${opentracker_conf:-/etc/opentracker/$RC_SVCNAME.conf}
pidfile=/run/$RC_SVCNAME.pid

depend() {
	need net
	after firewall
}

start() {
	ebegin "Starting ${name}"
	start-stop-daemon --start --quiet \
		--make-pidfile \
		--pidfile ${pidfile} \
		--background \
		--stdout /dev/null \
		--stderr /dev/null \
		--exec ${daemon} \
		-- \
		-d /var/empty \
		-f $conf \
		-u ${opentracker_user:-opentracker} \
		${opentracker_opts}
	eend $?
}

stop() {
	ebegin "Stopping ${name}"
	start-stop-daemon --stop --quiet --pidfile ${pidfile} \
		--exec ${daemon}
	eend $?
}