Subversion Repositories ALCASAR

Rev

Rev 3219 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 3219 Rev 3227
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-watchdog.sh 3219 2024-07-05 14:54:19Z rexy $
2
# $Id: alcasar-watchdog.sh 3227 2024-10-08 09:35:31Z rexy $
3
 
3
 
4
# alcasar-watchdog.sh
4
# alcasar-watchdog.sh
5
# by Rexy
5
# by Rexy
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
# - Ce script prévient les usagers de l'indisponibilité de l'accès Internet
7
# - Ce script prévient les usagers de l'indisponibilité de l'accès Internet
Line 80... Line 80...
80
			then
80
			then
81
			systemctl restart network
81
			systemctl restart network
82
		else
82
		else
83
			if [ "$MULTIWAN" == "off" ] || [ "$MULTIWAN" == "Off" ]
83
			if [ "$MULTIWAN" == "off" ] || [ "$MULTIWAN" == "Off" ]
84
				then
84
				then
-
 
85
				IP_GW_count=`/sbin/ip route list|grep ^default|wc -l`
-
 
86
				if [ $IP_GW_count -ne 1 ]
-
 
87
					then
-
 
88
					systemctl restart network
-
 
89
				fi
85
				IP_GW=`/sbin/ip route list|grep ^default|cut -d" " -f3`
90
				IP_GW=`/sbin/ip route list|grep ^default|cut -d" " -f3`
86
				arp_reply=`/usr/sbin/arping -I$EXTIF -c1 $IP_GW|grep response|cut -d" " -f2`
91
				arp_reply=`/usr/sbin/arping -I$EXTIF -c1 $IP_GW|grep response|cut -d" " -f2`
87
				if [ $arp_reply -eq "0" ]
92
				if [ $arp_reply -eq "0" ]
88
					then
93
					then
89
					LAN_DOWN="2"
94
					LAN_DOWN="2"