Subversion Repositories ALCASAR

Rev

Rev 2965 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
2965 rexy 1
#!/bin/sh
2
#
3
# $Id: alcasar-conup.sh 2886 2020-11-23 22:50:01Z rexy $
4
#
5
# alcasar-list-users.sh
6
# by Rexy
7
# This script is distributed under the Gnu General Public License (GPL)
8
 
9
# This script displays authenticated systems (users & @MAC)  with their gw
10
# Ce script affiche les systèmes authentifiés (utilisateurs et @MAC) avec leur routeur
11
 
12
CONF_FILE="/usr/local/etc/alcasar.conf"
13
 
14
nb_gw=`grep ^WAN $CONF_FILE | wc -l`
15
for (( i = 0 ; i <= $nb_gw ; i++ ));do
2973 rexy 16
	gw="gw$i"; gw_order=`expr $1 + 1`
2965 rexy 17
	ip_list=`ipset l $gw|grep -v :`
18
	for ip in $ip_list;do
2973 rexy 19
		echo "$ip $gw_order"
2965 rexy 20
	done	
21
done