Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. current=`ifconfig | grep inet6 | sed -n '2p' | awk '{print $2}'`
  4. pihole=`cat /etc/pihole/setupVars.conf | grep IPV6 | awk -F '=' '{print $2}'`
  5.  
  6. if [ "$current" = "$pihole" ]; then
  7. exit 0
  8. else
  9. sed -i s/IPV6_ADDRESS=.*/IPV6_ADDRESS=$current/g /etc/pihole/setupVars.conf;exit 1
  10. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement