summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schiffbauer <mschiff@gentoo.org>2015-10-15 20:47:06 +0200
committerMarc Schiffbauer <mschiff@gentoo.org>2015-10-15 21:25:33 +0200
commit66260d6ce7505ce26c446e7297320ecf4b16727c (patch)
tree4ff93f668dc80cbcec264d9de8e45c1b1f66e2f3 /mail-filter
parentkde-base/kdelibs: remove old (diff)
downloadgentoo-66260d6ce7505ce26c446e7297320ecf4b16727c.tar.gz
gentoo-66260d6ce7505ce26c446e7297320ecf4b16727c.tar.bz2
gentoo-66260d6ce7505ce26c446e7297320ecf4b16727c.zip
mail-filter/amavisd-new: revbump for improved init scripts
Fix for amavis-mc inti script. Added new (missing) amavisd-snmp init script which is used for both, amavisd-snmp-subagent and amavisd-snmp-subagent-zmq. amavisd-snmp-subagent-zmq will be used if available and nothing else is defined by the user via /etc/conf.d/amavisd-snmp:amavisd_snmp_command= Package-Manager: portage-2.2.23
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/amavisd-new/amavisd-new-2.9.1-r1.ebuild (renamed from mail-filter/amavisd-new/amavisd-new-2.9.1.ebuild)3
-rw-r--r--mail-filter/amavisd-new/files/amavis-mc.initd22
-rw-r--r--mail-filter/amavisd-new/files/amavisd-snmp.initd21
3 files changed, 29 insertions, 17 deletions
diff --git a/mail-filter/amavisd-new/amavisd-new-2.9.1.ebuild b/mail-filter/amavisd-new/amavisd-new-2.9.1-r1.ebuild
index 83c2ccb89132..860a1e3489e6 100644
--- a/mail-filter/amavisd-new/amavisd-new-2.9.1.ebuild
+++ b/mail-filter/amavisd-new/amavisd-new-2.9.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -108,6 +108,7 @@ src_install() {
dosbin amavisd-snmp-subagent
use zmq && dosbin amavisd-snmp-subagent-zmq
dodoc AMAVIS-MIB.txt
+ newinitd "${FILESDIR}"/amavisd-snmp.initd amavisd-snmp
fi
if use zmq ; then
diff --git a/mail-filter/amavisd-new/files/amavis-mc.initd b/mail-filter/amavisd-new/files/amavis-mc.initd
index d194139360a1..0725ef99143e 100644
--- a/mail-filter/amavisd-new/files/amavis-mc.initd
+++ b/mail-filter/amavisd-new/files/amavis-mc.initd
@@ -1,24 +1,14 @@
-#!/sbin/runscript
-# Copyright 1999-2012 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-prog="/usr/sbin/amavis-mc"
-progname="amavis-mc"
+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() {
- ebegin "Starting ${progname}"
- start-stop-daemon --start --exec ${prog}
- eend $?
-}
-
-stop() {
- ebegin "Stopping ${progname}"
- start-stop-daemon --stop --interpreted --exec ${prog}
- eend $?
-}
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..e42fe47e0369
--- /dev/null
+++ b/mail-filter/amavisd-new/files/amavisd-snmp.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+
+depend() {
+ use logger
+ before amavisd-new snmpd
+}
+
+start_pre() {
+ if [[ -x ${command}-zmq && ! $amavisd_snmp_command ]]; then
+ command="${command}-zmq"
+ fi
+}