Subversion Repositories ALCASAR

Rev

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

Rev 2455 Rev 2474
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-watchdog.sh 2455 2017-12-09 19:14:05Z tom.houdayer $
2
# $Id: alcasar-watchdog.sh 2474 2017-12-30 02:00:04Z 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 13... Line 13...
13
# - It logs out users whose MAC address is used by other systems (usurped)
13
# - It logs out users whose MAC address is used by other systems (usurped)
14
 
14
 
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=`echo "$private_ip_mask" |cut -d"/" -f1`		# @ip du portail (côté LAN)
20
PRIVATE_IP=`echo "$private_ip_mask" |cut -d"/" -f1`		# @ip du portail (côté LAN)
21
PRIVATE_IP=${PRIVATE_IP:=192.168.182.1}
21
PRIVATE_IP=${PRIVATE_IP:=192.168.182.1}
22
current_users_file="/var/tmp/havp/current_users.txt"		# file containing active users with their "status.php" tab open
22
current_users_file="/var/tmp/havp/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"