Created
September 28, 2014 00:12
-
-
Save furushchev/42c3e98ba4ec82f20483 to your computer and use it in GitHub Desktop.
Update No-ip DDNS
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 | |
if [ "$1" = "" ]; then | |
GLOBAL_IP=`curl -s ifconfig.me` | |
else | |
GLOBAL_IP=$1 | |
fi | |
USERNAME=username | |
PASSWORD=password | |
HOSTNAME=hostname | |
echo "updating ip address to $GLOBAL_IP" | |
echo "curl http://$USERNAME:$PASSWORD@dynupdate.no-ip.com/nic/update?hostname=$HOSTNAME&myip=$GLOBAL_IP" | |
curl "http://$USERNAME:$PASSWORD@dynupdate.no-ip.com/nic/update?hostname=$HOSTNAME&myip=$GLOBAL_IP"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment