aboutsummaryrefslogtreecommitdiff
path: root/net/ddns-scripts/Makefile
diff options
context:
space:
mode:
authorChris Barrick <chrisbarrick@google.com>2022-12-03 23:00:51 -0500
committerChris Barrick <cbarrick1@gmail.com>2022-12-08 22:04:33 -0500
commitcbdc67bd107ac8c64f2dc20f742f7171a405e63d (patch)
tree2cb928f8234fca7a47603d6644454d185ce962e7 /net/ddns-scripts/Makefile
parent02e154d3e56bd35b2db345250c17e41da0edcfa9 (diff)
ddns-scripts: add support for Google Cloud DNS
The implementation uses a GCP service account. The user is expected to create and secure a service account and generate a private key. The "password" field can contain the key inline or be a file path pointing to the key file on the router. The GCP project name and Cloud DNS ManagedZone must also be provided. These are taken as form-urlencoded key-value pairs in param_enc. The TTL can optionally be supplied in param_opt. Signed-off-by: Chris Barrick <chrisbarrick@google.com>
Diffstat (limited to 'net/ddns-scripts/Makefile')
-rw-r--r--net/ddns-scripts/Makefile34
1 files changed, 33 insertions, 1 deletions
diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile
index 8c51476c3..9e6e57ba7 100644
--- a/net/ddns-scripts/Makefile
+++ b/net/ddns-scripts/Makefile
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ddns-scripts
PKG_VERSION:=2.8.2
-PKG_RELEASE:=29
+PKG_RELEASE:=30
PKG_LICENSE:=GPL-2.0
@@ -70,6 +70,17 @@ define Package/ddns-scripts-cloudflare/description
endef
+define Package/ddns-scripts-gcp
+ $(call Package/ddns-scripts/Default)
+ TITLE:=Extension for Google Cloud DNS API v1
+ DEPENDS:=ddns-scripts +curl +openssl-util
+endef
+
+define Package/ddns-scripts-gcp/description
+ Dynamic DNS Client scripts extension for Google Cloud DNS API v1 (requires curl)
+endef
+
+
define Package/ddns-scripts-freedns
$(call Package/ddns-scripts/Default)
TITLE:=Extension for freedns.42.pl
@@ -323,6 +334,7 @@ define Package/ddns-scripts-services/install
# Remove special services
rm $(1)/usr/share/ddns/default/cloudflare.com-v4.json
+ rm $(1)/usr/share/ddns/default/cloud.google.com-v1.json
rm $(1)/usr/share/ddns/default/freedns.42.pl.json
rm $(1)/usr/share/ddns/default/godaddy.com-v1.json
rm $(1)/usr/share/ddns/default/digitalocean.com-v2.json
@@ -358,6 +370,25 @@ exit 0
endef
+define Package/ddns-scripts-gcp/install
+ $(INSTALL_DIR) $(1)/usr/lib/ddns
+ $(INSTALL_BIN) ./files/usr/lib/ddns/update_gcp_v1.sh \
+ $(1)/usr/lib/ddns
+
+ $(INSTALL_DIR) $(1)/usr/share/ddns/default
+ $(INSTALL_DATA) ./files/usr/share/ddns/default/cloud.google.com-v1.json \
+ $(1)/usr/share/ddns/default/
+endef
+
+define Package/ddns-scripts-gcp/prerm
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+ /etc/init.d/ddns stop
+fi
+exit 0
+endef
+
+
define Package/ddns-scripts-freedns/install
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) ./files/usr/lib/ddns/update_freedns_42_pl.sh \
@@ -608,6 +639,7 @@ endef
$(eval $(call BuildPackage,ddns-scripts))
$(eval $(call BuildPackage,ddns-scripts-services))
$(eval $(call BuildPackage,ddns-scripts-cloudflare))
+$(eval $(call BuildPackage,ddns-scripts-gcp))
$(eval $(call BuildPackage,ddns-scripts-freedns))
$(eval $(call BuildPackage,ddns-scripts-godaddy))
$(eval $(call BuildPackage,ddns-scripts-digitalocean))