Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2044 → Rev 2175

//scripts/alcasar-file-clean.sh
23,7 → 23,7
done
 
# remove empty lines and put rights
for file in $ALCASAR_SERVICES $ALCASAR_EXCEPTIONS $ALCASAR_IP_BLOCKED $ALCASAR_CONF $ALCASAR_UAMDOMAIN $ALCASAR_UAMALLOWED
for file in $ALCASAR_SERVICES $ALCASAR_IP_BLOCKED $ALCASAR_CONF $ALCASAR_UAMDOMAIN $ALCASAR_UAMALLOWED
do
$SED "/^$/d" $file
chown root:apache $file
30,7 → 30,7
chmod 660 $file
done
 
#update dnsmasq-blackhole for uamallowed ALCASAR_UAMDOMAIN
#update dnsmasq-blackhole with uamallowed domains ($ALCASAR_UAMDOMAIN)
#remove old configuration
sed -i '/^server=/d' /etc/dnsmasq-blackhole.conf
 
39,5 → 39,7
domain_exception="server=/$(echo $domain | cut -d'"' -f2)/#"
sed -i "/conf-file/a$domain_exception" /etc/dnsmasq-blackhole.conf
done
 
systemctl restart dnsmasq-blackhole
if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't restart on install stage
then
systemctl restart dnsmasq-blackhole
fi