aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rrdbot/rrdbotd.initd
blob: 5fae6e8ddab70969e5fdc2f544453ea31e1cc5ce (plain) (blame)
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
#!/sbin/runscript

name=rrdbotd
daemon=/usr/sbin/$name
pidfile=${rrdbotd_pidfile:-/var/run/rrdbotd/rrdbotd.pid}

depend() {
	need net
	after firewall
}

start() {
	ebegin "Starting ${name}"
	start-stop-daemon --start --quiet \
		--pidfile "$pidfile" \
		--user ${rrdbotd_user:-rrdbotd}:${rrdbotd_group:-rrdbotd} \
		--exec ${daemon} -- ${rrdbotd_opts} -p "$pidfile"
	eend $?
}

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