ajacoutot d515ff077d Sanitize rc.d script:
- no need to override rc_start()
- only checkconf when it makes sense

ok jca@ (maintainer)
2015-04-14 06:38:23 +00:00

29 lines
405 B
Bash

#!/bin/sh
#
# $OpenBSD: knot.rc,v 1.4 2015/04/14 06:38:23 ajacoutot Exp $
daemon="${PREFIX}/sbin/knotd -d"
knotc="${PREFIX}/sbin/knotc"
knotcheckconf="${knotc} checkconf"
. /etc/rc.d/rc.subr
rc_pre() {
install -d -o _knot -g wheel -m 750 /var/run/knot/
${knotcheckconf}
}
rc_check() {
${knotc} status
}
rc_reload() {
${knotcheckconf} && ${knotc} reload
}
rc_stop() {
${knotc} stop
}
rc_cmd $1