2a21002d53
source package for providing DMARC report generation and policy enforcement services. It includes a library for handling DMARC record parsing, a database schema and tools for aggregating and processing transaction history to produce DMARC reports, and a filter that ties it all together with an MTA using the milter protocol.
39 lines
853 B
Bash
39 lines
853 B
Bash
#!@RCD_SCRIPTS_SHELL@
|
|
#
|
|
# $NetBSD: opendmarc.sh,v 1.1 2013/12/05 16:00:19 pettai Exp $
|
|
#
|
|
# PROVIDE: opendmarc
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: mail
|
|
|
|
if [ -f /etc/rc.subr ]; then
|
|
. /etc/rc.subr
|
|
fi
|
|
|
|
name="opendmarc"
|
|
rcvar=$name
|
|
command="@PREFIX@/sbin/opendmarc"
|
|
pidfile="@VARBASE@/run/opendmarc/${name}.pid"
|
|
command_args="-P ${pidfile} -c @PKG_SYSCONFDIR@/opendmarc.conf"
|
|
required_files="@PKG_SYSCONFDIR@/opendmarc.conf"
|
|
start_precmd="opendmarc_precmd"
|
|
|
|
opendmarc_precmd()
|
|
{
|
|
if [ ! -d @VARBASE@/run/opendmarc ]; then
|
|
@MKDIR@ @VARBASE@/run/opendmarc
|
|
@CHMOD@ 0750 @VARBASE@/run/opendmarc
|
|
fi
|
|
|
|
if [ -f @VARBASE@/run/opendmarc/${name}.sock ]; then
|
|
@RM@ -f @VARBASE@/run/opendmarc/${name}.sock
|
|
fi
|
|
}
|
|
|
|
if [ -f /etc/rc.subr ]; then
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|
|
else
|
|
echo -n " ${name}"
|
|
${command} ${opendmarc_flags} ${command_args}
|
|
fi
|