Created
July 7, 2022 01:11
-
-
Save mbierman/087fef1cf42713269edfc96848ae71de to your computer and use it in GitHub Desktop.
config_dnsmasq.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
reboot=false | |
if [ ! -f ~/.firewalla/config/dnsmasq_local/staylocal ] ; then | |
echo -e "local=/lan/127.0.0.2\nlocal=/local/127.0.0.2\nlocal=/lan22/127.0.0.2\nlocal=/lan33/127.0.0.2\nlocal=/lan44/127.0.0.2\nlocal=/lan55/127.0.0.2\nlocal=/lan66/127.0.0.2\nlocal=/gst/127.0.0.2" > ~/.firewalla/config/dnsmasq_local/staylocal | |
echo dnsmasq: staylocal configured | |
reboot=true | |
else | |
echo dnsmasq: staylocal exists, nothing to do | |
fi | |
if [ ! -f ~/.firewalla/config/dnsmasq_local/pigpen ] ; then | |
echo -e "address=/home/192.168.0.19\naddress=/pigpen/192.168.0.19\n address=/unifi/192.168.0.19\n address=/homebridge/192.168.0.19" > ~/.firewalla/config/dnsmasq_local/pigpen | |
echo dnsmasq: pigpen configured | |
reboot=true | |
else | |
echo dnsmasq: pigpen exists, nothing to do | |
fi | |
if [ "$reboot" = "true" ] ; then | |
sudo systemctl stop firerouter_dns | |
sudo systemctl start firerouter_dns | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment