diff options
author | Marc Schiffbauer <mschiff@gentoo.org> | 2016-06-06 16:11:50 +0200 |
---|---|---|
committer | Marc Schiffbauer <mschiff@gentoo.org> | 2016-06-06 16:12:19 +0200 |
commit | 577b994e0f43d9e4b772774e462793aea86f7414 (patch) | |
tree | b646dab535f983f7dfdafe7b0a7089e3824522f3 /mail-filter/amavisd-new/files | |
parent | sys-apps/sysvinit: amd64 stable wrt bug #580958 (diff) | |
download | gentoo-577b994e0f43d9e4b772774e462793aea86f7414.tar.gz gentoo-577b994e0f43d9e4b772774e462793aea86f7414.tar.bz2 gentoo-577b994e0f43d9e4b772774e462793aea86f7414.zip |
mail-filter/amavisd-new: Fix depend and conf.d setting in amavisd-snmp
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'mail-filter/amavisd-new/files')
-rw-r--r-- | mail-filter/amavisd-new/files/amavisd-snmp.initd | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/mail-filter/amavisd-new/files/amavisd-snmp.initd b/mail-filter/amavisd-new/files/amavisd-snmp.initd index 97324190aaa4..fca5f12acf2c 100644 --- a/mail-filter/amavisd-new/files/amavisd-snmp.initd +++ b/mail-filter/amavisd-new/files/amavisd-snmp.initd @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -9,14 +9,24 @@ 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() { - if [[ -x ${command}-zmq && ! $amavisd_snmp_command ]]; then - command="${command}-zmq" - fi + update_command checkpath -d -o amavis /run/amavis } |