Created
October 20, 2023 18:45
-
-
Save fabienduhamel/186311b642257b45949b904b39510e04 to your computer and use it in GitHub Desktop.
OVH Dyndns script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
output=$(curl -s --fail -w "%{http_code}" -u '<user>:<password>' -XGET "https://www.ovh.com/nic/update?system=dyndns&hostname=<hostname>&myip=$(curl -s https://ipinfo.io/ip)") ; [[ $? -eq 0 ]] && (echo $output | grep -Fq 'nochg') || echo $output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment