Subversion Repositories ALCASAR

Rev

Rev 2537 | Rev 2830 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2537 Rev 2539
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-watchdog.sh 2537 2018-04-30 04:07:45Z tom.houdayer $
2
# $Id: alcasar-watchdog.sh 2539 2018-04-30 04:37:54Z tom.houdayer $
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 35... Line 35...
35
		logger -t alcasar-watchdog "$EXTIF (WAN card) link down"
35
		logger -t alcasar-watchdog "$EXTIF (WAN card) link down"
36
		echo "$EXTIF (WAN card) link down"
36
		echo "$EXTIF (WAN card) link down"
37
		/bin/sed -i "s?diagnostic =.*?diagnostic = \"$EXTIF (WAN card) link down\";?g" $Index_Page
37
		/bin/sed -i "s?diagnostic =.*?diagnostic = \"$EXTIF (WAN card) link down\";?g" $Index_Page
38
		;;
38
		;;
39
	"2")
39
	"2")
40
		logger -t alcasar-watchdog 'can't contact the default router'
40
		logger -t alcasar-watchdog "can't contact the default router"
41
		echo "can't contact the default router"
41
		echo "can't contact the default router"
42
		/bin/sed -i "s?diagnostic =.*?diagnostic = \"can't contact the default router\";?g" $Index_Page
42
		/bin/sed -i "s?diagnostic =.*?diagnostic = \"can't contact the default router\";?g" $Index_Page
43
		;;
43
		;;
44
	esac
44
	esac
45
	net_pb=`grep "network_pb = true;" $Index_Page|wc -l`
45
	net_pb=`grep "network_pb = true;" $Index_Page|wc -l`