[Amavisd-new-commits] [pkg-amavisd-new] 17/21: Fix amavisd-snmp-subagent init foo
Alexander Wirt
formorer at debian.org
Thu Sep 19 07:06:01 UTC 2013
This is an automated email from the git hooks/post-receive script.
formorer pushed a commit to branch master
in repository pkg-amavisd-new.
commit 21376a47257e5016ad449b35d9d670845b37c89d
Author: Alexander Wirt <formorer at debian.org>
Date: Thu Sep 19 09:03:44 2013 +0200
Fix amavisd-snmp-subagent init foo
Git-Dch: Ignore
---
debian/amavisd-new.amavisd-snmp-subagent.default | 13 +++++++++++++
debian/amavisd-new.amavisd-snmp-subagent.init | 18 ++++++++++++++----
2 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/debian/amavisd-new.amavisd-snmp-subagent.default b/debian/amavisd-new.amavisd-snmp-subagent.default
index 28c2655..9ed5f3f 100644
--- a/debian/amavisd-new.amavisd-snmp-subagent.default
+++ b/debian/amavisd-new.amavisd-snmp-subagent.default
@@ -1,3 +1,16 @@
# To enable the amavis-snmp-subagent set ENABLED to yes
ENABLED="no"
+
+# there are two implementations of the subagent daemon:
+# 1) the default bdb version
+# 2) a zero mq based version
+# if you want to use this agent you need at least
+# libnet-snmp-perl installed.
+# the zeromq version also need libzmq-constants-perl and
+# libzmq-libzmq2-perl. Also don't forget to enable zeromq
+# in amavis: $enable_zmq = 1;
+#
+# See RELEASE_NOTES for details.
+
+AGENT_BACKEND="bdb" # use zeromq for the zeromq version
diff --git a/debian/amavisd-new.amavisd-snmp-subagent.init b/debian/amavisd-new.amavisd-snmp-subagent.init
index 60e269b..9d1e5f5 100644
--- a/debian/amavisd-new.amavisd-snmp-subagent.init
+++ b/debian/amavisd-new.amavisd-snmp-subagent.init
@@ -21,6 +21,7 @@ DAEMON=/usr/sbin/$NAME
DAEMON_ARGS="-P /var/run/$NAME.pid"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
+AGENT_BACKEND="bdb"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
@@ -28,6 +29,15 @@ SCRIPTNAME=/etc/init.d/$NAME
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+case "$AGENT_BACKEND" in
+ bdb)
+ DAEMON=/usr/sbin/amavisd-snmp-subagent
+ ;;
+ zeromq)
+ DAEMON=/usr/sbin/amavisd-snmp-subagent-zmq
+ ;;
+esac
+
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
@@ -56,7 +66,7 @@ do_start()
then
if [ -d /proc/`cat $PIDFILE`/ ]
then
- echo "$NAME already running."
+ echo "$NAME (${AGENT_BACKEND} version) already running."
exit 0;
else
rm -f $PIDFILE
@@ -111,7 +121,7 @@ do_reload() {
case "$1" in
start)
- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC ($AGENT_BACKEND version)" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
@@ -119,7 +129,7 @@ case "$1" in
esac
;;
stop)
- [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC ($AGENT_BACKEND version)" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
@@ -143,7 +153,7 @@ case "$1" in
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
- log_daemon_msg "Restarting $DESC" "$NAME"
+ log_daemon_msg "Restarting $DESC ($AGENT_BACKEND version)" "$NAME"
do_stop
case "$?" in
0|1)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/amavisd-new/pkg-amavisd-new.git
More information about the Amavisd-new-commits
mailing list