Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 496 → Rev 497

/scripts/sbin/alcasar-safesearch.sh
0,0 → 1,40
#/bin/sh
# $Id: alcasar-bl.sh 412 2011-01-03 21:40:09Z richard $
 
# enable or disable safesearch filter on DG
# active ou désactive la fonction safesearch sur DG
# By rexy
 
DIR_DG="/etc/dansguardian/lists"
SED="/bin/sed -i"
 
usage="Usage: alcasar-safesearch.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
;;
# Safe search activation
-on | --on)
$SED "s?^#\"?\"?g" $DIR_DG/urlregexplist
service dansguardian restart
;;
# safesearch desactivation
-off | --off)
$SED "s?^[^#]?#&?g" $DIR_DG/urlregexplist
service dansguardian restart
;;
*)
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