Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 649 → Rev 650

/scripts/sbin/alcasar-dg-pureip.sh
0,0 → 1,42
#/bin/sh
 
# alcasar-dg-pureip.sh
# by Yohan & Rexy
# This script is distributed under the Gnu General Public License (GPL)
 
# Gestion Dansguardian
SED="/bin/sed -i"
function ip_disable (){
$SED "s/^\*ip$/#*ip/g" /etc/dansguardian/lists/bannedsitelist
service dansguardian reload
}
function ip_enable (){
$SED "s/^\#\*ip$/*ip/g" /etc/dansguardian/lists/bannedsitelist
service dansguardian reload
}
usage="Usage: alcasar-dg-pureip.sh {--on or -on} | {--off or -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|-on)
ip_enable
;;
--off|-off)
ip_disable
;;
*)
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
+*
\ No newline at end of property