Quad5Ny

DHCP Renew Script (WIP)

Jul 19th, 2014
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  1. pfail=0
  2. while [ true ]; do
  3. /bin/sleep 30
  4. if ping -c 1 184.152.16.1;then
  5. pfail=0
  6. continue
  7. else
  8. let pfail=pfail+1
  9. fi
  10. if [ $pfail -eq  2];then
  11. /sbin/dhcpc-renew
  12. /bin/sleep 15
  13. fi
  14. done
Advertisement
Add Comment
Please, Sign In to add comment