Subversion Repositories ALCASAR

Rev

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

Rev 2883 Rev 2884
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-watchdog.sh 2883 2020-11-15 21:14:52Z rexy $
2
# $Id: alcasar-watchdog.sh 2884 2020-11-16 22:12:53Z 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 15... Line 15...
15
CONF_FILE="/usr/local/etc/alcasar.conf"
15
CONF_FILE="/usr/local/etc/alcasar.conf"
16
EXTIF=`grep ^EXTIF= $CONF_FILE|cut -d"=" -f2`			# EXTernal InterFace
16
EXTIF=`grep ^EXTIF= $CONF_FILE|cut -d"=" -f2`			# EXTernal InterFace
17
INTIF=`grep ^INTIF= $CONF_FILE|cut -d"=" -f2`			# INTernal InterFace
17
INTIF=`grep ^INTIF= $CONF_FILE|cut -d"=" -f2`			# INTernal InterFace
18
private_ip_mask=`grep ^PRIVATE_IP= $CONF_FILE|cut -d"=" -f2`
18
private_ip_mask=`grep ^PRIVATE_IP= $CONF_FILE|cut -d"=" -f2`
19
private_ip_mask=${private_ip_mask:=192.168.182.1/24}
19
private_ip_mask=${private_ip_mask:=192.168.182.1/24}
20
PRIVATE_IP="192.168.182.1"
20
PRIVATE_IP=`echo $private_ip_mask |cut -d"/" -f1`
21
PRIVATE_IP="192.168.182.1"
21
PRIVATE_IP=${PRIVATE_IP:=192.168.182.1}
22
current_users_file="/tmp/current_users.txt"		# file containing active users with their "status.php" tab open
22
current_users_file="/tmp/current_users.txt"		# file containing active users with their "status.php" tab open
23
DIR_WEB="/var/www/html"
23
DIR_WEB="/var/www/html"
24
Index_Page="$DIR_WEB/index.php"
24
Index_Page="$DIR_WEB/index.php"
25
IPTABLES="/sbin/iptables"
25
IPTABLES="/sbin/iptables"
26
TUNIF="tun0"							# listen device for chilli daemon
26
TUNIF="tun0"							# listen device for chilli daemon