Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2841 → Rev 2864

/scripts/alcasar-watchdog.sh
17,8 → 17,8
INTIF=`grep ^INTIF= $CONF_FILE|cut -d"=" -f2` # INTernal InterFace
private_ip_mask=`grep ^PRIVATE_IP= $CONF_FILE|cut -d"=" -f2`
private_ip_mask=${private_ip_mask:=192.168.182.1/24}
PRIVATE_IP=`echo "$private_ip_mask" |cut -d"/" -f1` # @ip du portail (côté LAN)
PRIVATE_IP=${PRIVATE_IP:=192.168.182.1}
PRIVATE_IP="192.168.182.1"
PRIVATE_IP="192.168.182.1"
current_users_file="/tmp/current_users.txt" # file containing active users with their "status.php" tab open
DIR_WEB="/var/www/html"
Index_Page="$DIR_WEB/index.php"
41,6 → 41,11
echo "can't contact the default router"
/bin/sed -i "s?diagnostic =.*?diagnostic = \"can't contact the default router\";?g" $Index_Page
;;
"3")
logger -t alcasar-watchdog "can't resolv DNS queries"
echo "can't resolv DNS queries"
/bin/sed -i "s?diagnostic =.*?diagnostic = \"can't resolv DNS queries\";?g" $Index_Page
;;
esac
net_pb=`grep "network_pb = true;" $Index_Page|wc -l`
if [ $net_pb = "0" ] # user alert (only the first time)
81,6 → 86,15
fi
fi
fi
# DNS request testing
if [ $LAN_DOWN -eq "0" ]
then
dns_reply=`/usr/bin/host -W1 free.fr|grep SERVFAIL|wc -l`
if [ $dns_reply -eq "1" ]
then
LAN_DOWN="3"
fi
fi
# if LAN pb detected, users are warned
if [ $LAN_DOWN != "0" ]
then