/scripts/alcasar-conf.sh |
---|
90,8 → 90,6 |
cp -rf $DIR_UPDATE/etc/* $DIR_DEST_ETC/ |
chown root:apache $DIR_DEST_ETC/* |
chmod 660 $DIR_DEST_ETC/* |
chown havp:apache $DIR_DEST_ETC/havp |
chmod 770 $DIR_DEST_ETC/havp |
rm -rf $DIR_UPDATE |
;; |
*) |
/scripts/sbin/alcasar-uninstall.sh |
---|
99,17 → 99,22 |
[ -d /etc/dansguardian/lists/blacklists.default ] && mv -f /etc/dansguardian/lists/blacklists.default /etc/dansguardian/lists/blacklists && echo -n "10" |
sleep 1 |
#antivirus |
echo -en "\n-11 antivirus(6) : " |
echo -en "\n-11 antivirus(5) : " |
if [ -e /etc/init.d/havp ] |
then |
chkconfig --del havp && echo -n "1, " |
umount /var/tmp/havp && echo -n "2, " |
umount /var/tmp/havp && echo -n "1, " |
sleep 1 |
rm -rf /var/tmp/havp /var/log/havp /var/run/havp /usr/local/etc/havp && echo -n "3, " |
rm -f /tmp/havp-disk && echo -n "4, " |
rm -rf /var/tmp/havp && echo -n "2, " |
rm -f /tmp/havp-disk && echo -n "3, " |
$SED "/^# Entry for havp/d" /etc/fstab |
$SED "/^\/tmp\/havp-disk/d" /etc/fstab && echo -n "5, " |
userdel havp && echo -n "6" |
$SED "/^\/tmp\/havp-disk/d" /etc/fstab && echo -n "4, " |
[ -e /etc/havp/havp.conf.default ] && mv /etc/havp/havp.conf.default /etc/havp/havp.conf && echo -n "5" |
if [ -e /usr/local/sbin/havp ] # on traite la version 1.9a |
then |
rm -rf /usr/local/etc/havp |
rm -rf /usr/local/sbin/havp |
userdel -r havp |
fi |
else echo -n "non installé" |
fi |
sleep 1 |
/scripts/alcasar-watchdog.sh |
---|
18,7 → 18,7 |
do |
noresponse_ip=`echo $noresponse | cut -d" " -f1` |
noresponse_mac=`echo $noresponse | cut -d" " -f2` |
arp_reply=`/usr/sbin/arping -b -I$INTIF -s$PRIVATE_IP -c1 $noresponse_ip|grep response|cut -d" " -f2` |
arp_reply=`/usr/sbin/arping -b -I$INTIF -s$PRIVATE_IP -c1 -w4 $noresponse_ip|grep response|cut -d" " -f2` |
if [[ $(expr $arp_reply) -eq 0 ]] |
then |
logger "alcasar-watchdog $noresponse_ip ($noresponse_mac) reste muette. On déconnecte." |
33,10 → 33,10 |
active_ip=`echo $system |cut -d" " -f2` |
active_session=`echo $system |cut -d" " -f5` |
active_mac=`echo $system | cut -d" " -f1` |
# on ne traite que les équipements exploitées par un usager authentifié |
# on ne traite que les équipements exploitées par un usager authentifié (test de 2 réponses en 4 secondes) |
if [[ $(expr $active_session) -eq 1 ]] |
then |
arp_reply=`/usr/sbin/arping -b -I$INTIF -s$PRIVATE_IP -c2 $active_ip|grep response|cut -d" " -f2` |
arp_reply=`/usr/sbin/arping -b -I$INTIF -s$PRIVATE_IP -c2 -w4 $active_ip|grep response|cut -d" " -f2` |
# on stocke les adresses IP des stations muettes |
if [[ $(expr $arp_reply) -eq 0 ]] |
then |