1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/opendmarc/opendmarc.initd
2021-05-30 18:56:03 +02:00

30 lines
675 B
Text

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