aboutsummaryrefslogtreecommitdiffstats
path: root/main/opentracker/opentracker.initd
blob: 548be7a20fd28725530c9949400b2b60fc781994 (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
37
38
#!/sbin/openrc-run

# Sample init.d file for alpine linux.

name=opentracker
daemon=/usr/bin/$name
conf=${opentracker_conf:-/etc/opentracker/opentracker.conf}
pidfile=/var/run/opentracker.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 $?
}