aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2018-09-12 01:55:08 +0800
committercrees <crees@FreeBSD.org>2018-09-12 01:55:08 +0800
commit6e9eafdd4d6b6dba993b5e30c43fd5e70f05e62f (patch)
tree758c2e32d640e74bbc286fe88eee9665b8c36536
parentd5b511535e26d9a84708743509a360612f073c6f (diff)
downloadfreebsd-ports-gnome-6e9eafdd4d6b6dba993b5e30c43fd5e70f05e62f.tar.gz
freebsd-ports-gnome-6e9eafdd4d6b6dba993b5e30c43fd5e70f05e62f.tar.zst
freebsd-ports-gnome-6e9eafdd4d6b6dba993b5e30c43fd5e70f05e62f.zip
Upstream patch; fix use when multiple types are
in use from one domain/host
-rw-r--r--dns/namesilo_ddns/Makefile1
-rw-r--r--dns/namesilo_ddns/files/patch-eb8e0141
2 files changed, 42 insertions, 0 deletions
diff --git a/dns/namesilo_ddns/Makefile b/dns/namesilo_ddns/Makefile
index 73e94af991f4..2af2e5ad55da 100644
--- a/dns/namesilo_ddns/Makefile
+++ b/dns/namesilo_ddns/Makefile
@@ -2,6 +2,7 @@
PORTNAME= namesilo_ddns
PORTVERSION= 2.1
+PORTREVISION= 1
DISTVERSIONPREFIX=v
CATEGORIES= dns net
diff --git a/dns/namesilo_ddns/files/patch-eb8e01 b/dns/namesilo_ddns/files/patch-eb8e01
new file mode 100644
index 000000000000..bde5311880a6
--- /dev/null
+++ b/dns/namesilo_ddns/files/patch-eb8e01
@@ -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
+