summaryrefslogtreecommitdiff
path: root/mail-filter/amavisd-new/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /mail-filter/amavisd-new/files
reinit the tree, so we can have metadata
Diffstat (limited to 'mail-filter/amavisd-new/files')
-rw-r--r--mail-filter/amavisd-new/files/amavis-mc.initd17
-rw-r--r--mail-filter/amavisd-new/files/amavisd-snmp.initd31
-rw-r--r--mail-filter/amavisd-new/files/amavisd.initd45
-rw-r--r--mail-filter/amavisd-new/files/amavisd.initd-r144
-rw-r--r--mail-filter/amavisd-new/files/amavisd.service22
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