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

