Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2829 → Rev 2830

/scripts/alcasar-conf.sh
101,7 → 101,7
tar -cf alcasar-conf.tar conf/
gzip -f alcasar-conf.tar
new="$(date +%G%m%d-%Hh%M)" # date & hour of files
cp alcasar-conf.tar.gz /var/SAVE/conf_file/alcasar-conf-$new.tar.gz
cp alcasar-conf.tar.gz /var/Save/conf_file/alcasar-conf-$new.tar.gz
rm -rf $DIR_UPDATE
;;
 
/scripts/alcasar-watchdog.sh
68,11 → 68,17
# Default GW testing
if [ $LAN_DOWN -eq "0" ]
then
IP_GW=`/sbin/ip route list|grep ^default|cut -d" " -f3`
arp_reply=`/usr/sbin/arping -I$EXTIF -c1 $IP_GW|grep response|cut -d" " -f2`
if [ $arp_reply -eq "0" ]
GW_EXIST=`/sbin/ip route list|grep ^default|wc -l`
if [ $GW_EXIST -eq "0" ] # no GW defined !
then
LAN_DOWN="2"
systemctl restart network
else
IP_GW=`/sbin/ip route list|grep ^default|cut -d" " -f3`
arp_reply=`/usr/sbin/arping -I$EXTIF -c1 $IP_GW|grep response|cut -d" " -f2`
if [ $arp_reply -eq "0" ]
then
LAN_DOWN="2"
fi
fi
fi
# if LAN pb detected, users are warned