split user-controlled variables from calculated ones
authorgregor herrmann <gregoa@debian.org>
Tue, 9 Aug 2016 14:44:01 +0000 (16:44 +0200)
committergregor herrmann <gregoa@debian.org>
Tue, 9 Aug 2016 14:44:01 +0000 (16:44 +0200)
makes diffing against production easier

bin/client/tdyndns_client

index 1c04e34725d78eccf722f0f364651581f287e51e..2d7a7567b1c1f2e43e0f0b9d61d7b8d2b49e2696 100755 (executable)
@@ -28,11 +28,13 @@ warn() {
 
 USERNAME=sue
 PASSWORD=hygCithOrs5
-HOSTNAME=$(hostname)
 ZONE=dyn.example.com
-FQDN=$HOSTNAME.$USERNAME.$ZONE
 NS=ns.example.com
-URL="http://dyndns.example.com/nic/update?hostname=$FQDN&myip="
+WEB=dyndns.example.com
+
+HOSTNAME=$(hostname)
+FQDN=$HOSTNAME.$USERNAME.$ZONE
+URL="http://$WEB/nic/update?hostname=$FQDN&myip="
 WGET="wget -q --tries=2 --timeout=5"
 
 if [ -z "$HOSTNAME" ] ; then