#!/sbin/openrc-run

# munin-node init.d file for alpine linux.
name="munin-node"
description="Daemon for reporting statistics on system performance"

pidfile=/run/munin/${name}.pid

command=/usr/sbin/munin-node
command_args="${EXTRA_OPTS}"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -d -o munin:munin -m755 /run/munin
	checkpath -d -o munin:munin -m755 /var/lib/munin/spool
	checkpath -d -o munin:munin -m755 /var/log/munin
}
