Guest User

Untitled

a guest
Jan 16th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. curl http://username:password@dynupdate.no-ip.com/nic/update?hostname=mytest.example.com&myip=1.2.3.4
  2.  
  3. #!/bin/bash
  4.  
  5. IP=$(/sbin/ip -4 a l wwan0 | grep 'inet ' | grep -oP '(?<=inets)d+(.d+){3}')
  6.  
  7. curl "http://username:password@dynupdate.no-ip.com/nic/update?hostname=mytest.example.com&myip=${IP}"
  8.  
  9. chmod 755 /home/user/update_noip.sh
  10. crontab -e
  11. # Add:
  12. */10 * * * * /home/user/update_noip.sh >/dev/null 2>&1
Add Comment
Please, Sign In to add comment