0,0 → 1,44 |
#/bin/bash |
|
# alcasar-dg-pureip.sh |
# by Yohan DUBANCHET and Richard REY |
# This script is distributed under the Gnu General Public License (GPL) |
|
# Activation / désactivation du filtrage d'url contenant des adresse IP (et non des noms de domaine) |
# enable/disable filter of url that contains IP address (instead of domain names) |
|
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 |
Added: svn:keywords |
+Date Author Id |
\ No newline at end of property |