Diff for /badi/public_scripts/switchgate/switchgate between versions 1.1 and 1.2

version 1.1, 2009/04/24 00:12:49 version 1.2, 2009/12/17 11:16:34
Line 16  CONFIG_PATH="/etc/switchgate" Line 16  CONFIG_PATH="/etc/switchgate"
 # the dhclient-exit-hook helper program  # the dhclient-exit-hook helper program
 DHCP_TMP_DIR=/tmp/switchgate  DHCP_TMP_DIR=/tmp/switchgate
   
   # eMail address to send alert messages, if not operating on the
   # standard default gateway
   ALERT_EMAIL="adi@ente.limmat.ch"
   
 # Host set to ping. A file containing IP addresses, each on a single line.  # Host set to ping. A file containing IP addresses, each on a single line.
 # Do not include any local hosts, list only hosts located behind your gateways.  # Do not include any local hosts, list only hosts located behind your gateways.
 HOSTSET_FILE="$CONFIG_PATH/hostset"  HOSTSET_FILE="$CONFIG_PATH/hostset"
Line 341  else Line 345  else
    fi     fi
 fi  fi
   
   # send an eMail if the connection is down or limited
   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_SUBJECT="Attention: $(hostname -f) has no connection!"
           echo -e "$EMAIL_BODY" | mail -s "$EMAIL_SUBJECT" "$ALERT_EMAIL"
           if [[ -n "$DEBUG" && "$DEBUG" != "low" ]]; then
                   echo "Alert message sent to $ALERT_EMAIL."
           fi
   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_SUBJECT="Attention: $(hostname -f) Not operating on standard default gateway!"
           echo -e "$EMAIL_BODY" | mail -s "$EMAIL_SUBJECT" "$ALERT_EMAIL"
           if [[ -n "$DEBUG" && "$DEBUG" != "low" ]]; then
                   echo "Alert message sent to $ALERT_EMAIL."
           fi
   fi
   
 if [ "$DEBUG" = "low" ]; then  if [ "$DEBUG" = "low" ]; then
    echo     echo
    echo "Default Gateway: $CURRENTGW ($CURRENTGW_ID)"     echo "Default Gateway: $CURRENTGW ($CURRENTGW_ID)"

Removed from v.1.1  
changed lines
  Added in v.1.2


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