# Usage: run when switching from an untrusted network like public wifi
# to a trusted one.
-rm -f /etc/dnsmasq.d/untrusted-network.conf
+if [[ -e /etc/dnsmasq.d/untrusted-network.conf ]]; then
+ rm -f /etc/dnsmasq.d/untrusted-network.conf
-systemctl reload dnsmasq
+ nscd -i hosts
+ systemctl reload dnsmasq
+fi