From: Mike Frysinger Date: Sun, 21 Feb 2016 03:21:45 +0000 (-0500) Subject: donsupdate: punt X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b1a474a51fa7877813ed16925b8bb7b1a48cc021;p=home.git donsupdate: punt --- diff --git a/.bin/donsupdate b/.bin/donsupdate deleted file mode 100755 index ae7c176..0000000 --- a/.bin/donsupdate +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -[ "$1" = "-u" ] && UPDATE=true || UPDATE=false - -IP=`ip a s dev eth0 | sed -n '/inet 10\./s:.*inet \([^/ ]*\).*:\1:p'` - -doit() { - HOST=$1 - DOMAIN="ad.analog.com" - FQDN="$HOST.$DOMAIN" - - if ${UPDATE} ; then - currip=$(dig +short $FQDN) - [ "${currip}" = "${IP}" ] && return 0 - fi - - cat <<-EOF | nsupdate - server 10.64.53.110 - update delete $FQDN A - update add $FQDN 86400 A $IP - send - EOF -} - -doit vapier-adi -doit vapier