aports/openrc/opendkim/runfile

18 lines
560 B
Plaintext

#!/sbin/openrc-run
pidfile="${OPENDKIM_RUNTIME:-/run/opendkim}/${RC_SVCNAME}.pid"
command=/usr/sbin/opendkim
command_args="-l -P ${pidfile} -x ${OPENDKIM_CONF:-/etc/opendkim/opendkim.conf}"
command_user="${command_user:-opendkim:opendkim}"
depend() {
need net
after firewall mta syslog
}
start_pre() {
checkpath -d -o "$command_user" -m755 "${OPENDKIM_RUNTIME:-/run/opendkim}"
checkpath -f -o "$command_user" -m440 "${OPENDKIM_CONF:-/etc/opendkim/opendkim.conf}"
checkpath -f -o "$command_user" -m440 "${OPENDKIM_KEY:-/etc/opendkim/default.private}"
}