summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-09-29 20:42:58 +0200
committerFlorian Pritz <bluewind@xssn.at>2010-09-29 20:42:58 +0200
commitb95644f566d8bfdd2a11d689fe000650d67efcfe (patch)
tree38dc58fedd7b92d061c76ca1fce85a94d9c9b444
parent28bd88fd90570f3e400de5e54ca7ab2432e3826b (diff)
downloadbin-b95644f566d8bfdd2a11d689fe000650d67efcfe.tar.gz
bin-b95644f566d8bfdd2a11d689fe000650d67efcfe.tar.xz
watchdog.sh: fix mail recipient
Signed-off-by: Florian Pritz <bluewind@xssn.at>
-rwxr-xr-xwatchdog.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/watchdog.sh b/watchdog.sh
index ae5e482..72f628d 100755
--- a/watchdog.sh
+++ b/watchdog.sh
@@ -150,13 +150,13 @@ watcher () {
fi
let counter=$counter+1
if [ "$counter" -eq $MAX_FAIL ]; then
- mail root -s "$IP - $TYPE DOWN! " <<< "$IP - $TYPE is down since $downtime
+ mail $USER -s "$IP - $TYPE DOWN! " <<< "$IP - $TYPE is down since $downtime
$(tracepath $IP)"
dbg "$IP - $TYPE down since $downtime"
fi
else
if [ "$counter" -gt $MAX_FAIL ] || [ "$counter" -eq $MAX_FAIL ]; then
- mail root -s "$IP - $TYPE UP! " <<< "$IP - $TYPE is OK again.
+ mail $USER -s "$IP - $TYPE UP! " <<< "$IP - $TYPE is OK again.
Downtime: ${downtime} - $(date)"
dbg "$IP - $TYPE up again $(date)"
echo "$IP - $TYPE Downtime: ${downtime} - $(date)" >> $LOGFILE