15,7 → 15,6 |
ALCASAR_UAMALLOWED="$DIR_CONF/alcasar-uamallowed" |
ALCASAR_CONF="$DIR_CONF/alcasar.conf" |
|
|
# sort file content |
for file in $ALCASAR_SERVICES $ALCASAR_IP_BLOCKED $ALCASAR_UAMDOMAIN $ALCASAR_UAMALLOWED |
do |
30,3 → 29,15 |
chown root:apache $file |
chmod 660 $file |
done |
|
#update dnsmasq-blackhole for uamallowed ALCASAR_UAMDOMAIN |
#remove old configuration |
sed -i '/^server=/d' /etc/dnsmasq-blackhole.conf |
|
for domain in $(cat $ALCASAR_UAMDOMAIN | cut -d' ' -f1) |
do |
domain_exception="server=/$(echo $domain | cut -d'"' -f2)/#" |
sed -i "/conf-file/a$domain_exception" /etc/dnsmasq-blackhole.conf |
done |
|
systemctl restart dnsmasq-blackhole |