29,17 → 29,3 |
chown root:apache $file |
chmod 660 $file |
done |
|
#update dnsmasq-blackhole with uamallowed domains ($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 |
if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't restart on install stage |
then |
systemctl restart dnsmasq-blackhole |
fi |