51,10 → 51,20 |
mkdir $DIR_IP_BL_ENABLED |
chown apache $DIR_IP_BL_ENABLED |
fi |
rm -rf $DIR_DNS_BL_ENABLED $DIR_DNS_WL_ENABLED # cleaning for dnsmasq and iptables |
if [ -d $DIR_DNS_BL_ENABLED ] |
then |
for file in `ls -1 $DIR_DNS_BL_ENABLED | grep -v "^ossi-*"` |
do |
rm -f $DIR_DNS_BL_ENABLED/$file |
done |
else |
mkdir $DIR_DNS_BL_ENABLED |
chown apache $DIR_DNS_BL_ENABLED |
fi |
rm -rf $DIR_DNS_WL_ENABLED # cleaning for dnsmasq and iptables |
$SED "/\.Include/d" $DIR_DG/bannedsitelist $DIR_DG/bannedurllist # cleaning for DG |
$SED "s?^[^#]?#&?g" $BL_CATEGORIES $WL_CATEGORIES # cleaning BL & WL categories file (comment all lines) |
mkdir $DIR_DNS_BL_ENABLED $DIR_DNS_WL_ENABLED |
mkdir $DIR_DNS_WL_ENABLED |
# process the file $BL_CATEGORIES with the choice of categories |
for ENABLE_CATEGORIE in `cat $BL_CATEGORIES_ENABLED` |
do |
85,10 → 95,10 |
$SED "s/^reportinglevel =.*/reportinglevel = 3/g" /etc/dansguardian/dansguardian.conf |
if [ "$PARENT_SCRIPT" != "alcasar-conf.sh" ] # don't launch on install stage |
then |
service dansguardian restart |
service dnsmasq restart |
service dnsmasq-blacklist restart |
service dnsmasq-whitelist restart |
/bin/systemctl restart dansguardian |
/bin/systemctl restart dnsmasq |
/bin/systemctl restart dnsmasq-blacklist |
/bin/systemctl restart dnsmasq-whitelist |
/usr/local/bin/alcasar-iptables.sh |
fi |
} |
100,10 → 110,10 |
$SED "s/^\*ip$/#*ip/g" $DIR_DG/bannedsitelist # remove pureip browsing |
if [ "$PARENT_SCRIPT" != "alcasar-conf.sh" ] # don't launch on install stage |
then |
service dansguardian restart |
service dnsmasq restart |
service dnsmasq-blacklist restart |
service dnsmasq-whitelist restart |
/bin/systemctl restart dansguardian |
/bin/systemctl restart dnsmasq |
/bin/systemctl restart dnsmasq-blacklist |
/bin/systemctl restart dnsmasq-whitelist |
/usr/local/bin/alcasar-iptables.sh |
fi |
} |