summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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