Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 39 → Rev 40

/scripts/sbin/alcasar-bypass.sh
0,0 → 1,45
#!/bin/sh
# Script portail-bypass
# Permet d'activer ou de désactiver le contournement de l'authentification et du filtrage WEB
usage="Usage: alcasar-bypass.sh -on | -off"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
nb_args=1
args="-h"
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
-on)
# activation du contournement
for i in chilli squid dansguardian httpd mysqld radiusd
do
if (pgrep $i) > /dev/null ; then /etc/init.d/$i stop ; fi
done
echo "Configure eth1 ..."
ifup eth1
sh /usr/local/bin/alcasar-iptables-bypass.sh
if ! (pgrep dhcpd) > /dev/null ; then /etc/init.d/dhcpd start ; fi
echo "Le contournement du module d'authentification et de filtrage WEB est activé"
echo "les journaux du parefeu continuent néanmoins d'être enregistrés"
;;
-off)
# désactivation du contournement
if (pgrep dhcpd) > /dev/null ; then /etc/init.d/dhcpd stop ; fi
for i in chilli squid dansguardian httpd mysqld radiusd
do
if ! (pgrep $i) > /dev/null ; then /etc/init.d/$i start ; fi
done
sh /usr/local/bin/alcasar-iptables.sh
echo "L'authentification et le filtrage WEB sont de nouveau activés"
;;
*)
echo "Argument inconnu :$1";
echo "$usage"
exit 1
;;
esac
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable