Diff for /badi/public_scripts/switchgate/switchgate between versions 1.3 and 1.4

version 1.3, 2009/12/17 11:44:47 version 1.4, 2009/12/17 11:55:02
Line 353  fi Line 353  fi
   
 # send an eMail if the connection is down or limited  # send an eMail if the connection is down or limited
 if [ -z "$UP" ]; then  if [ -z "$UP" ]; then
         EMAIL_BODY="Switchgate on $(hostname -f) reports: No connection!\n\n\nTime:\t\t$(date)\nGateway:\t$CURRENTGW ($CURRENTGW_ID)"          EMAIL_BODY="Switchgate on $(hostname -f) reports: No connection!\n\nTime:\t\t$(date)\nGateway:\t$CURRENTGW ($CURRENTGW_ID)"
         EMAIL_SUBJECT="Attention: $(hostname -f) has no connection!"          EMAIL_SUBJECT="Attention: $(hostname -f) has no connection!"
         echo -e "$EMAIL_BODY" | mail -s "$EMAIL_SUBJECT" "$ALERT_EMAIL"          echo -e "$EMAIL_BODY" | mail -s "$EMAIL_SUBJECT" "$ALERT_EMAIL"
         if [[ -n "$DEBUG" && "$DEBUG" != "low" ]]; then          if [[ -n "$DEBUG" && "$DEBUG" != "low" ]]; then
                 echo "Alert message sent to $ALERT_EMAIL."                  echo "Alert message sent to $ALERT_EMAIL."
         fi          fi
 elif [ "$CURRENTGW_ID" != 0 ]; then  elif [ "$CURRENTGW_ID" != 0 ]; then
         EMAIL_BODY="Switchgate on $(hostname -f) reports: Not operating on standard default gateway!\n\n\nTime:\t\t$(date)\nGateway:\t$CURRENTGW ($CURRENTGW_ID)"          EMAIL_BODY="Switchgate on $(hostname -f) reports: Not operating on standard default gateway!\n\nTime:\t\t$(date)\nGateway:\t$CURRENTGW ($CURRENTGW_ID)"
         EMAIL_SUBJECT="Attention: $(hostname -f) Not operating on standard default gateway!"          EMAIL_SUBJECT="Attention: $(hostname -f) not operating on standard default gateway!"
         echo -e "$EMAIL_BODY" | mail -s "$EMAIL_SUBJECT" "$ALERT_EMAIL"          echo -e "$EMAIL_BODY" | mail -s "$EMAIL_SUBJECT" "$ALERT_EMAIL"
         if [[ -n "$DEBUG" && "$DEBUG" != "low" ]]; then          if [[ -n "$DEBUG" && "$DEBUG" != "low" ]]; then
                 echo "Alert message sent to $ALERT_EMAIL."                  echo "Alert message sent to $ALERT_EMAIL."

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>