Subversion Repositories ALCASAR

Rev

Rev 1472 | Rev 1500 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 1472 Rev 1474
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-watchdog.sh 1472 2014-11-03 17:56:00Z richard $
2
# $Id: alcasar-watchdog.sh 1474 2014-11-03 22:55:09Z richard $
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 32... Line 32...
32
# users are redirected on ALCASAR IP address if a LAN problem is detected
32
# users are redirected on ALCASAR IP address if a LAN problem is detected
33
{
33
{
34
	case $LAN_DOWN in
34
	case $LAN_DOWN in
35
	"1")
35
	"1")
36
		logger "$EXTIF (WAN card) link down"
36
		logger "$EXTIF (WAN card) link down"
37
		echo "$EXTIF (WAN card) is down"
37
		echo "$EXTIF (WAN card) link down"
38
		/bin/sed -i "s?diagnostic =.*?diagnostic = \"$EXTIF (WAN card) link down\";?g" $Index_Page
38
		/bin/sed -i "s?diagnostic =.*?diagnostic = \"$EXTIF (WAN card) link down\";?g" $Index_Page
39
		;;
39
		;;
40
	"2")
40
	"2")
41
		logger "can't contact the default router"
41
		logger "can't contact the default router"
42
		echo "can't contact the default router"
42
		echo "can't contact the default router"