diff options
Diffstat (limited to 'mail-filter/amavisd-new/files')
-rw-r--r-- | mail-filter/amavisd-new/files/amavis-mc.initd | 17 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/amavisd-snmp.initd | 31 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/amavisd.initd | 45 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/amavisd.initd-r1 | 44 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/amavisd.service | 22 |
5 files changed, 159 insertions, 0 deletions
diff --git a/mail-filter/amavisd-new/files/amavis-mc.initd b/mail-filter/amavisd-new/files/amavis-mc.initd new file mode 100644 index 000000000000..84658da9a4e2 --- /dev/null +++ b/mail-filter/amavisd-new/files/amavis-mc.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/run/amavis/amavis-mc.pid" +command="/usr/sbin/amavis-mc" +command_args="${amavis_mc_args} -P ${pidfile}" +start_stop_daemon_args="--interpreted" + +depend() { + use logger + before amavisd-new snmpd +} + +start_pre() { + checkpath -d -o amavis /run/amavis +} diff --git a/mail-filter/amavisd-new/files/amavisd-snmp.initd b/mail-filter/amavisd-new/files/amavisd-snmp.initd new file mode 100644 index 000000000000..fc23a1fc1019 --- /dev/null +++ b/mail-filter/amavisd-new/files/amavisd-snmp.initd @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +name="amavisd-snmp" +pidfile="/run/amavis/${name}.pid" +command="/usr/sbin/${name}-subagent" +command_args="${amavis_snmp_args} -P ${pidfile}" +start_stop_daemon_args="--interpreted" + +update_command() { + if [[ -x ${command}-zmq && ! $amavisd_snmp_command ]]; then + command="${command}-zmq" + elif [[ $amavisd_snmp_command ]]; then + command="$amavisd_snmp_command" + fi +} + +depend() { + use logger + before amavisd-new snmpd + update_command + if [[ ${command##*-} == "zmq" ]]; then + need amavis-mc + fi +} + +start_pre() { + update_command + checkpath -d -o amavis /run/amavis +} diff --git a/mail-filter/amavisd-new/files/amavisd.initd b/mail-filter/amavisd-new/files/amavisd.initd new file mode 100644 index 000000000000..4899296cc140 --- /dev/null +++ b/mail-filter/amavisd-new/files/amavisd.initd @@ -0,0 +1,45 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" +extra_commands="debug debug_sa" + +prog="/usr/sbin/amavisd" +progname="amavisd-new" + +depend() { + need net + use logger antivirus snmpd + before mta +} + +start() { + ebegin "Starting ${progname}" + "${prog}" start + eend $? +} + +stop() { + ebegin "Stopping ${progname}" + "${prog}" stop 1>/dev/null + eend $? +} + +reload() { + ebegin "Reloading ${progname}" + "${prog}" reload 1>/dev/null + eend $? +} + +debug() { + ebegin "Starting ${progname} in debug mode" + "${prog}" debug + eend $? +} + +debug_sa() { + ebegin "Starting ${progname} in debug-sa mode" + "${prog}" debug-sa + eend $? +} diff --git a/mail-filter/amavisd-new/files/amavisd.initd-r1 b/mail-filter/amavisd-new/files/amavisd.initd-r1 new file mode 100644 index 000000000000..d772433aa418 --- /dev/null +++ b/mail-filter/amavisd-new/files/amavisd.initd-r1 @@ -0,0 +1,44 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" +extra_commands="debug debug_sa" + +prog="/usr/sbin/amavisd" +progname="amavisd-new" + +depend() { + use net logger antivirus snmpd + before mta +} + +start() { + ebegin "Starting ${progname}" + "${prog}" start + eend $? +} + +stop() { + ebegin "Stopping ${progname}" + "${prog}" stop 1>/dev/null + eend $? +} + +reload() { + ebegin "Reloading ${progname}" + "${prog}" reload 1>/dev/null + eend $? +} + +debug() { + ebegin "Starting ${progname} in debug mode" + "${prog}" debug + eend $? +} + +debug_sa() { + ebegin "Starting ${progname} in debug-sa mode" + "${prog}" debug-sa + eend $? +} diff --git a/mail-filter/amavisd-new/files/amavisd.service b/mail-filter/amavisd-new/files/amavisd.service new file mode 100644 index 000000000000..c53c38ac1632 --- /dev/null +++ b/mail-filter/amavisd-new/files/amavisd.service @@ -0,0 +1,22 @@ +[Unit] +Description=Amavisd Daemon +Wants=postfix.service +Wants=spamassassin.service +Wants=clamd.service +After=network.target + +[Service] +User=amavis +Group=amavis +ExecStart=/usr/sbin/amavisd -c /etc/amavisd.conf foreground +ExecReload=/usr/sbin/amavisd -c /etc/amavisd.conf reload +PrivateTmp=true +CapabilityBoundingSet= +ProtectSystem=full +NoNewPrivileges=true +PrivateDevices=true +ProtectHome=true +MemoryDenyWriteExecute=true + +[Install] +WantedBy=multi-user.target |