12,7 → 12,7 |
# Enable / disable : filter of urls containing ip address instead of domain name |
|
CONF_FILE="/usr/local/etc/alcasar.conf" |
DIR_DG="/etc/e2guardian/lists" |
DIR_DG_GROUP1="/etc/e2guardian/lists/group1" |
UNBOUND_BL_DOMAIN_FILTER_CONF="/etc/unbound/conf.d/blacklist/domainfilter.conf" |
SED="/bin/sed -i" |
safesearch="Off" |
69,7 → 69,7 |
|
if [ "$safesearch" == "On" ] |
then |
$SED "s?^#\"?\"?g" $DIR_DG/urlregexplist # on décommente les lignes de regles |
$SED "s?^#\"?\"?g" $DIR_DG_GROUP1/urlregexplist # on décommente les lignes de regles |
# add 'SafeSearch' redirection for google searching |
google_safe_server=`host -ta forcesafesearch.google.com | grep "address" | cut -d" " -f4` # retrieve google forcesafesearch ip |
|
103,7 → 103,7 |
$SED 's/^BL_SAFESEARCH=.*/BL_SAFESEARCH=on/g' $CONF_FILE |
elif [ "$safesearch" == "Off" ] |
then |
$SED "s?^[^#]?#&?g" $DIR_DG/urlregexplist |
$SED "s?^[^#]?#&?g" $DIR_DG_GROUP1/urlregexplist |
[ -e $UNBOUND_BL_DOMAIN_FILTER_CONF ] && rm -f $UNBOUND_BL_DOMAIN_FILTER_CONF |
|
$SED 's/^BL_SAFESEARCH=.*/BL_SAFESEARCH=off/g' $CONF_FILE |
111,14 → 111,14 |
|
if [ "$pureip" == "On" ] |
then |
$SED "s/^\#\*ip$/*ip/g" $DIR_DG/bannedsitelist |
$SED "s/^\#\*ips$/*ips/g" $DIR_DG/bannedsitelist |
$SED "s/^\#\*ip$/*ip/g" $DIR_DG_GROUP1/bannedsitelist |
$SED "s/^\#\*ips$/*ips/g" $DIR_DG_GROUP1/bannedsitelist |
|
$SED 's/^BL_PUREIP=.*/BL_PUREIP=on/g' $CONF_FILE |
elif [ "$pureip" == "Off" ] |
then |
$SED "s/^\*ip$/#*ip/g" $DIR_DG/bannedsitelist |
$SED "s/^\*ips$/#*ips/g" $DIR_DG/bannedsitelist |
$SED "s/^\*ip$/#*ip/g" $DIR_DG_GROUP1/bannedsitelist |
$SED "s/^\*ips$/#*ips/g" $DIR_DG_GROUP1/bannedsitelist |
|
$SED 's/^BL_PUREIP=.*/BL_PUREIP=off/g' $CONF_FILE |
fi |