Skip to content

Instantly share code, notes, and snippets.

@wkf
Created March 28, 2014 13:39
Show Gist options
  • Save wkf/9832980 to your computer and use it in GitHub Desktop.
Save wkf/9832980 to your computer and use it in GitHub Desktop.
#!/bin/bash
r=${reason^^}
if [ "$r" = "REBOOT" ] || [ "$r" = "BOUND" ] || [ "$r" = "RENEW" ] && [ "$old_ip_address" != "$new_ip_address" ]; then
echo "address=/dev/$new_ip_address" > /etc/dnsmasq.d/dev
service dnsmasq restart
fi
@samccone
Copy link

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment