Intial commit
This commit is contained in:
7
UpdateIP.sh
Normal file
7
UpdateIP.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#Used for updating the ip subnet in DNSMasq
|
||||
NetIF=<Set to name of network interface>
|
||||
sleep 20
|
||||
ipa=$(ip -4 addr show $NetIF | grep -m 1 -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -E -o "([0-9]{1,3}[\.]){2}[0-9]{1,3}" |head -1 )
|
||||
ipa="$ipa"".0"
|
||||
sed -i '/dhcp-range/c\dhcp-range='"$ipa"',proxy' /etc/dnsmasq.conf
|
||||
service dnsmasq restart
|
||||
Reference in New Issue
Block a user