From ecea9e49850c4328179e26cb1816954e0890c947 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Mon, 19 Mar 2012 10:23:40 +0100 Subject: [PATCH] multiple trap dests --- defaults.conf | 3 ++- remote-backup | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/defaults.conf b/defaults.conf index 8159374..40cc775 100644 --- a/defaults.conf +++ b/defaults.conf @@ -13,7 +13,8 @@ RETRY_DELAY=60 #generate output EMAIL=1 #SNMP Traps -SNMPDEST=holay.b2f-concept.net +SNMPDEST+=( holay.b2f-concept.net ) +SNMPDEST+=( saird.b2f-concept.net ) SNMPCOMM=b2f ADDITIONAL_RSYNC_OPTS="" diff --git a/remote-backup b/remote-backup index 8946c82..0fa417d 100755 --- a/remote-backup +++ b/remote-backup @@ -397,5 +397,8 @@ if [ -n "$SNMPCOMM" -a -n "$SNMPDEST" ] then read uptime discard < /proc/uptime unset discard - snmptrap -v 2c -c $SNMPCOMM $SNMPDEST ${uptime/./} 1.3.6.1.4.1.39402.1.1.1 "${snmpTrapContent[@]}" + for dest in ${SNMPDEST[@]} + do + snmptrap -v 2c -c $SNMPCOMM $dest ${uptime/./} 1.3.6.1.4.1.39402.1.1.1 "${snmpTrapContent[@]}" + done fi