Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1056 → Rev 1827

/scripts/alcasar-nf.sh
0,0 → 1,41
#/bin/bash
# $Id$
 
# alcasar-nf.sh
# by Rexy
# This script is distributed under the Gnu General Public License (GPL)
 
# active ou desactive le filtrage de protocoles réseau
# enable or disable the network protocols filter
 
SED="/bin/sed -i"
CONF_FILE="/usr/local/etc/alcasar.conf"
 
usage="Usage: alcasar-nf.sh {--on | -on} | {--off | -off}"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
echo $usage
exit 1
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
--on|-on) # enable protocols filter
$SED "s?^PROTOCOLS_FILTERING.*?PROTOCOLS_FILTERING=on?g" $CONF_FILE
/usr/local/bin/alcasar-iptables.sh
;;
--off|-off) # disable protocols filter
$SED "s?^PROTOCOLS_FILTERING.*?PROTOCOLS_FILTERING=off?g" $CONF_FILE
/usr/local/bin/alcasar-iptables.sh
;;
*)
echo "Argument inconnu :$1";
echo "$usage"
exit 1
;;
esac
 
Property changes:
Added: svn:eol-style
+LF
\ No newline at end of property
Added: svn:executable
+*
\ No newline at end of property
Added: svn:keywords
+Id Author Date
\ No newline at end of property