Subversion Repositories ALCASAR

Rev

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

Rev 2896 Rev 2956
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $Id: alcasar-condown.sh 2896 2020-12-10 23:29:21Z rexy $
3
# $Id: alcasar-condown.sh 2956 2021-05-24 19:57:17Z rexy $
4
#
4
#
5
# alcasar-condown.sh
5
# alcasar-condown.sh
6
# by Rexy
6
# by Rexy & Pierre RIVAULT
7
# This script is distributed under the Gnu General Public License (GPL)
7
# This script is distributed under the Gnu General Public License (GPL)
8
 
8
 
9
# This script is started by coova after each logout
9
# This script is started by coova after each logout
10
# Ce script est lancé par coova à chaque déconnexion d'usager
10
# Ce script est lancé par coova à chaque déconnexion d'usager
11
 
11
 
Line 54... Line 54...
54
 
54
 
55
# Remove IP address from active users list
55
# Remove IP address from active users list
56
current_users_file="/tmp/current_users.txt"
56
current_users_file="/tmp/current_users.txt"
57
[ -e $current_users_file ] && sed -i "/^$FRAMED_IP_ADDRESS:/d" $current_users_file
57
[ -e $current_users_file ] && sed -i "/^$FRAMED_IP_ADDRESS:/d" $current_users_file
58
 
58
 
-
 
59
# Remove user_IP from ipset of load balancing
-
 
60
nb_gw=`grep ^WAN $CONF_FILE | wc -l`
-
 
61
for (( i = 0 ; i <= $nb_gw ; i++ ));do
-
 
62
	gw="gw$i"
-
 
63
	ipset test $gw $FRAMED_IP_ADDRESS 1>/dev/null 2>&1
-
 
64
	if [ $? -eq 0 ];then
-
 
65
		ipset del $gw $FRAMED_IP_ADDRESS
-
 
66
		break
-
 
67
	fi
-
 
68
done
-
 
69
 
59
#############################
70
#############################
60
## Debug : show all the coova parse variables (+ ALCASAR-Filter + ALCASAR-Protocols-Filter).
71
## Debug : show all the coova parse variables (+ ALCASAR-Filter + ALCASAR-Protocols-Filter).
61
## see "/src/chilli.c" for the complete list of parse variables
72
## see "/src/chilli.c" for the complete list of parse variables
62
#debug_file="/tmp/debug-condown.txt"
73
#debug_file="/tmp/debug-condown.txt"
63
#echo "-----------------------------------------------" >> $debug_file
74
#echo "-----------------------------------------------" >> $debug_file