-
-
Save vg/250d6598bd75340c4f57b242d9b9d7c0 to your computer and use it in GitHub Desktop.
Revisions
-
corny revised this gist
Feb 18, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fi if [ -n "$device" ]; then device="dev $device" fi address=$(ip -6 addr list scope global $device | grep -v " fd" | sed -n 's/.*inet6 \([0-9a-f:]\+\).*/\1/p' | head -n 1) if [ -e /usr/bin/curl ]; then bin="curl -fsS" -
corny revised this gist
Dec 23, 2014 . 1 changed file with 11 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,19 +4,19 @@ device=$2 file=$HOME/.dynv6.addr6 [ -e $file ] && old=`cat $file` if [ -z "$hostname" -o -z "$token" ]; then echo "Usage: token=<your-authentication-token> [netmask=64] $0 your-name.dynv6.net [device]" exit 1 fi if [ -z "$netmask" ]; then netmask=128 fi if [ -n "$device" ]; then device="dev $device" fi address=$(ip -6 addr list scope global dynamic $device | grep -v " fd" | sed -n 's/.*inet6 \([0-9a-f:]\+\).*/\1/p' | head -n 1) if [ -e /usr/bin/curl ]; then bin="curl -fsS" @@ -27,19 +27,22 @@ else exit 1 fi if [ -z "$address" ]; then echo "no IPv6 address found" exit 1 fi # address with netmask current=$address/$netmask if [ "$old" = "$current" ]; then echo "IPv6 address unchanged" exit fi # send addresses to dynv6 $bin "http://dynv6.com/api/update?hostname=$hostname&ipv6=$current&token=$token" $bin "http://ipv4.dynv6.com/api/update?hostname=$hostname&ipv4=auto&token=$token" # save current address echo $current > $file -
corny revised this gist
Dec 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fi if [ -n "$device" ]; then device="dev $device" fi current=$(ip -6 addr list scope global dynamic $device | grep -v " fd" | sed -n 's/.*inet6 \([0-9a-f:]\+\).*/\1/p' | head -n 1) if [ -e /usr/bin/curl ]; then bin="curl -fsS" -
corny revised this gist
Dec 21, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,10 +5,14 @@ file=$HOME/.dynv6.addr6 [ -e $file ] && old=`cat $file` if [ -z "$hostname" -o -z "$TOKEN" ]; then echo "Usage: TOKEN=<your-authentication-token> [netmask=64] $0 your-name.dynv6.net [device]" exit 1 fi if [ -n "$netmask" ]; then netmask=128 fi if [ -n "$device" ]; then device="dev $device" fi @@ -34,7 +38,7 @@ if [ "$old" = "$current" ]; then fi # send addresses to dynv6 $bin "http://dynv6.com/api/update?hostname=$hostname&ipv6=$current/$netmask&token=$TOKEN" $bin "http://ipv4.dynv6.com/api/update?hostname=$hostname&ipv4=auto&token=$TOKEN" # save current address -
corny revised this gist
Oct 29, 2014 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,19 @@ #!/bin/sh -e hostname=$1 device=$2 file=$HOME/.dynv6.addr6 [ -e $file ] && old=`cat $file` if [ -z "$hostname" -o -z "$TOKEN" ]; then echo "Usage: TOKEN=<your-authentication-token> $0 your-name.dynv6.net [device]" exit 1 fi if [ -n "$device" ]; then device="dev $device" fi current=$(ip -6 addr list scope global dynamic $device | grep -v " fd" | egrep -o '([0-9a-f:]+)/[0-9]+' | head -n1) if [ -e /usr/bin/curl ]; then bin="curl -fsS" elif [ -e /usr/bin/wget ]; then -
corny revised this gist
Oct 29, 2014 . 1 changed file with 23 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,25 +3,34 @@ hostname=$1 current=$(ip -6 addr list scope global dynamic temporary | grep -v "fd00" | egrep -o '([0-9a-f:]+)/[0-9]+' | head -n1) file=$HOME/.dynv6.addr6 [ -e $file ] && old=`cat $file` if [ -z "$hostname" -o -z "$TOKEN" ]; then echo "Usage: TOKEN=<your-authentication-token> $0 your-name.dynv6.net" exit 1 fi if [ -e /usr/bin/curl ]; then bin="curl -fsS" elif [ -e /usr/bin/wget ]; then bin="wget -O-" else echo "neither curl nor wget found" exit 1 fi if [ -z "$current" ]; then echo "no IPv6 address found" exit 1 fi if [ "$old" = "$current" ]; then echo "IPv6 address unchanged" exit fi # send addresses to dynv6 $bin "http://dynv6.com/api/update?hostname=$hostname&ipv6=$current&token=$TOKEN" $bin "http://ipv4.dynv6.com/api/update?hostname=$hostname&ipv4=auto&token=$TOKEN" # save current address echo $current > $file -
corny created this gist
Oct 28, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ #!/bin/sh -e hostname=$1 current=$(ip -6 addr list scope global dynamic temporary | grep -v "fd00" | egrep -o '([0-9a-f:]+)/[0-9]+' | head -n1) file=$HOME/.dynv6.addr6 [ -e $file ] && old=`cat $file` if [ -z "$hostname" -o -z "$TOKEN" ]; then echo "Usage: TOKEN=<your-authentication-token> $0 your-name.dynv6.net" exit 1 fi if [ -z "$current" ]; then echo "no IPv6 address found" exit 1 fi if [ "$old" = "$current" ]; then echo "IPv6 address unchanged" exit fi # send addresses to dynv6 curl -fsS "http://dynv6.com/api/update?hostname=$hostname&ipv6=$current&token=$TOKEN" curl -fsS "http://ipv4.dynv6.com/api/update?hostname=$hostname&ipv4=auto&token=$TOKEN" # save current address echo $current > $file