Skip to content

Instantly share code, notes, and snippets.

@fabienduhamel
Created October 20, 2023 18:45
Show Gist options
  • Save fabienduhamel/186311b642257b45949b904b39510e04 to your computer and use it in GitHub Desktop.
Save fabienduhamel/186311b642257b45949b904b39510e04 to your computer and use it in GitHub Desktop.
OVH Dyndns script
#!/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