aboutsummaryrefslogblamecommitdiffstats
path: root/testing/opendmarc/opendmarc.initd
blob: e67caebd8cddf832af3ca07f969f1bb350fe1ea1 (plain) (tree)































                                                                                         
#!/sbin/openrc-run
supervisor=supervise-daemon

extra_commands="checkconfig"

description="Domain-based Message Authentication, Reporting & Conformance (DMARC) Milter"
description_checkconfig="Check configuration file"

: ${cfgfile:="/etc/opendmarc/$RC_SVCNAME.conf"}
: ${command_user:="opendmarc:mail"}

command="/usr/sbin/opendmarc"
command_args="-f -c $cfgfile ${command_args:-}"
pidfile="/run/opendmarc/$RC_SVCNAME.pid"

required_files="$cfgfile"

depends() {
	use dns logger net
	before mta
}

start_pre() {
	checkpath -d -m 750 -o "$command_user" "${pidfile%/*}" || return 1
	$command -c "$cfgfile" -n
}

checkconfig() {
	ebegin "Checking $name configuration"
	$command -c "$cfgfile" -n
	eend $?
}