Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2105 → Rev 2106

/scripts/alcasar-watchdog.sh
131,12 → 131,11
 
fi
 
#this temporary file contains every 'user IP address' which are connected to ALCASAR (status.php still open)
# this temporary file contains every 'user IP address' which are connected to ALCASAR (status.php still open)
if [ -e $tmp_users_file ]; then
 
for ip_user in $(cat $tmp_users_file)
do
#Check if user is still connected
# Check if thses users are also connected for chilli
data_user=$(/usr/sbin/chilli_query list | grep -v "\.0\.0\.0" | awk '$5 == 1' | grep $ip_user)
if [ $(echo $data_users | wc -l) -eq 0 ] #if user not in the file $tmp_users_file (it means that status.php has been closed)
then
144,7 → 143,6
active_ip=`echo $data_user |cut -d" " -f2`
active_mac=`echo $data_user | cut -d" " -f1`
active_user=`echo $data_user |cut -d" " -f6`
echo "$active_ip $active_mac $active_user" >> $tmp_file #save info for next time, user will be disconnected.
fi
done