24,7 → 24,6 |
WL_CATEGORIES="$DIR_CONF/alcasar-wl-categories" #' ' WL ' |
BL_CATEGORIES_ENABLED="$DIR_CONF/alcasar-bl-categories-enabled" # ' ' BL enabled categories |
WL_CATEGORIES_ENABLED="$DIR_CONF/alcasar-wl-categories-enabled" # ' ' WL enabled categories |
OSSI_DOMAINS_WL="$DIR_DG/blacklists/ossi/domains_wl" # Domain names for the ossi category |
DIR_SHARE="/usr/local/share" |
DIR_DNS_BL="$DIR_SHARE/dnsmasq-bl" # all the BL in the DNSMASQ format |
DIR_DNS_WL="$DIR_SHARE/dnsmasq-wl" # all the WL ' ' ' |
44,7 → 43,14 |
# saving ossi category |
mkdir $DIR_tmp |
cp $DIR_IP_BL/ossi $DIR_tmp |
|
|
if [ ! -e $DIR_DNS_WL/ossi.conf ] |
then |
touch $DIR_DNS_WL/ossi.conf |
chown apache $DIR_DNS_WL/ossi.conf |
ln -s $DIR_DNS_WL/ossi.conf $DIR_DNS_WL_ENABLED/ossi |
fi |
|
if [ -d $DIR_IP_BL_ENABLED ] |
then |
for file in `ls -1 $DIR_IP_BL_ENABLED | grep -v "^ossi-*"` |
249,9 → 255,7 |
fi |
cp -f $DIR_DG_BL/ossi/domains $DIR_DNS_BL/ossi.conf |
$SED "s?.*?address=/&/$PRIVATE_IP?g" $DIR_DNS_BL/ossi.conf |
cp -f $OSSI_DOMAINS_WL $DIR_DNS_WL/ossi.conf |
$SED "s?.*?server=/&/$DNS1?g" $DIR_DNS_WL/ossi.conf |
ln -s $DIR_DNS_WL/ossi.conf $DIR_DNS_WL_ENABLED/ossi |
|
/usr/bin/systemctl restart dnsmasq-blacklist |
/usr/bin/systemctl restart dnsmasq-whitelist |