Date: Tue, 11 Sep 2018 17:55:09 +0000 (UTC) From: Chris Rees <crees@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r479536 - in head/dns/namesilo_ddns: . files Message-ID: <201809111755.w8BHt9St068547@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: crees Date: Tue Sep 11 17:55:08 2018 New Revision: 479536 URL: https://svnweb.freebsd.org/changeset/ports/479536 Log: Upstream patch; fix use when multiple types are in use from one domain/host Added: head/dns/namesilo_ddns/files/ head/dns/namesilo_ddns/files/patch-eb8e01 (contents, props changed) Modified: head/dns/namesilo_ddns/Makefile Modified: head/dns/namesilo_ddns/Makefile ============================================================================== --- head/dns/namesilo_ddns/Makefile Tue Sep 11 16:41:02 2018 (r479535) +++ head/dns/namesilo_ddns/Makefile Tue Sep 11 17:55:08 2018 (r479536) @@ -2,6 +2,7 @@ PORTNAME= namesilo_ddns PORTVERSION= 2.1 +PORTREVISION= 1 DISTVERSIONPREFIX=v CATEGORIES= dns net Added: head/dns/namesilo_ddns/files/patch-eb8e01 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/dns/namesilo_ddns/files/patch-eb8e01 Tue Sep 11 17:55:08 2018 (r479536) @@ -0,0 +1,41 @@ +From eb8e0195483a91c06543d6f680898dc7d5baba50 Mon Sep 17 00:00:00 2001 +From: Chris Rees <crees@FreeBSD.org> +Date: Tue, 11 Sep 2018 18:50:59 +0100 +Subject: [PATCH] Fix use case where A and MX records (for example) exist for + the same domain + +diff --git a/README.md b/README.md +index 8b3f27e..1c18fde 100644 +--- a/README.md ++++ b/README.md +@@ -1,5 +1,5 @@ + ----------------------------------------------------------------- +-# namesilo_ddns version 2.0 ++# namesilo_ddns version 2.1_1 + Dynamic DNS record update with NameSilo. + + This is a shell script to update Namesilo's DNS record when IP changed. Set to run this script as cronjob in your system. +diff --git a/namesilo_ddns.sh b/namesilo_ddns.sh +index 741956e..ab1e0c3 100644 +--- a/namesilo_ddns.sh ++++ b/namesilo_ddns.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + +-# namesilo_ddns version 2.0 ++# namesilo_ddns version 2.1_1 + + ##For security, you should use a config file readable only by the user + ##calling this utility (root may not be such a great idea). There is an example +@@ -124,7 +124,7 @@ if [ "$CUR_IP" != "$KNOWN_IP" ]; then + + ##Update DNS record in Namesilo: + $CURL "https://www.namesilo.com/api/dnsListRecords?version=1&type=xml&key=$APIKEY&domain=$DOMAIN" > /tmp/$DOMAIN.xml +- RECORD_ID=`xmllint --xpath "//namesilo/reply/resource_record/record_id[../host/text() = '$HOST_DOT$DOMAIN' ]" /tmp/$DOMAIN.xml` ++ RECORD_ID=`xmllint --xpath "//namesilo/reply/resource_record/record_id[../host/text() = '$HOST_DOT$DOMAIN' ][../type = 'A' ]" /tmp/$DOMAIN.xml` + RECORD_ID=${RECORD_ID#*>} + RECORD_ID=${RECORD_ID%<*} + $CURL "https://www.namesilo.com/api/dnsUpdateRecord?version=1&type=xml&key=$APIKEY&domain=$DOMAIN&rrid=$RECORD_ID&rrhost=$HOST&rrvalue=$CUR_IP&rrttl=$TTL" > $RESPONSE +-- +2.16.2 +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809111755.w8BHt9St068547>