summaryrefslogtreecommitdiffstats
path: root/main/opentracker/opentracker.initd
blob: 33d28177875a6afa277fb1892b0b95deaab5757f (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/runscript

# 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 $?
}