openwrt-packages/net/ddns-scripts/Makefile

546 lines
16 KiB
Makefile
Raw Normal View History

#
# Copyright (C) 2008-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ddns-scripts
PKG_VERSION:=2.7.8
PKG_RELEASE:=24
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
define Package/ddns-scripts/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=IP Addresses and Names
PKGARCH:=all
endef
define Package/ddns-scripts
$(call Package/ddns-scripts/Default)
TITLE:=Dynamic DNS Client scripts (with IPv6 support)
endef
define Package/ddns-scripts/description
Dynamic DNS Client scripts (with IPv6 support)
A highly configurable set of scripts for doing dynamic dns updates.
- IPv6 support
- DNS server support
- Glue Record support (require BIND host or KNOT host)
- DNS requests via TCP
- Proxy server support
- log file support
- support to run once
Version: $(PKG_VERSION)-$(PKG_RELEASE)
Info : https://openwrt.org/docs/guide-user/services/ddns/client
endef
define Package/ddns-scripts/conffiles
/etc/config/ddns
endef
define Package/ddns-scripts_cloudflare.com-v4
$(call Package/ddns-scripts/Default)
TITLE:=Extension for cloudflare.com API v4
DEPENDS:=ddns-scripts +curl
endef
define Package/ddns-scripts_cloudflare.com-v4/description
Dynamic DNS Client scripts extension for cloudflare.com API v4 (require curl)
endef
define Package/ddns-scripts_freedns_42_pl
$(call Package/ddns-scripts/Default)
TITLE:=Extension for freedns.42.pl
DEPENDS:=ddns-scripts +curl
endef
define Package/ddns-scripts_freedns_42_pl/description
Dynamic DNS Client scripts extension for "freedns.42.pl".
endef
define Package/ddns-scripts_godaddy.com-v1
$(call Package/ddns-scripts/Default)
TITLE:=Extension for godaddy.com API v1
DEPENDS:=ddns-scripts +curl
endef
define Package/ddns-scripts_godaddy.com-v1/description
Dynamic DNS Client scripts extension for "godaddy.com API v1".
endef
define Package/ddns-scripts_digitalocean.com-v2
$(call Package/ddns-scripts/Default)
TITLE:=Extention for digitalocean.com API v2
DEPENDS:=ddns-scripts +curl
endef
define Package/ddns-scripts_digitalocean.com-v2/description
Dynamic DNS Client scripts extension for "digitalocean.com API v2".
The script directly updates a DNS record using the DO API.
It requires:
"option dns_server" to be set to the server to be used by nsupdate.
"option domain" the dns domain to update the record for (eg. A-record: home.<example.com>)
"option username" the dns record name to update (eg. A-record: <home>.example.com)
"option param_opt" the id of the dns record to update (check using chrome inspector in the DO dns tab)
"option password" the api token generated in the DO panel
endef
define Package/ddns-scripts_no-ip_com
$(call Package/ddns-scripts/Default)
TITLE:=Extension for no-ip.com
DEPENDS:=ddns-scripts
endef
define Package/ddns-scripts_no-ip_com/description
Dynamic DNS Client scripts extension for "no-ip.com".
endef
define Package/ddns-scripts_nsupdate
$(call Package/ddns-scripts/Default)
TITLE:=Extension for using bind nsupdate.
DEPENDS:=ddns-scripts +bind-client
endef
define Package/ddns-scripts_nsupdate/description
Dynamic DNS Client scripts extension for direct updates using bind nsupdate
The script directly updates a PowerDNS (or maybe bind server) via nsupdate
from bind-client package.
It requires:
"option dns_server" to be set to the server to be used by nsupdate.
"option username" should be set to the key name and
"option password" to the base64 encoded shared secret.
endef
define Package/ddns-scripts_route53-v1
$(call Package/ddns-scripts/Default)
TITLE:=Extension for route53 API v1
DEPENDS:=ddns-scripts +curl +openssl-util
endef
define Package/ddns-scripts_route53-v1/description
Dynamic DNS Client scripts extension for Amazon AWS "route53 API v1".
Note: You must also install ca-certificate or ca-bundle.
It requires:
"option username" to be a valid AWS access key id
"option password" to be the matching AWS secret key id
"option domain" to contain the hosted zone ID
endef
define Package/ddns-scripts_cnkuai_cn
$(call Package/ddns-scripts/Default)
TITLE:=CnKuai API
DEPENDS:=ddns-scripts +curl +giflib-utils
endef
define Package/ddns-scripts_cnkuai_cn/description
Dynamic DNS Client scripts extension for "cnkuai.cn".
It requires:
"option username" to be a valid CnKuai control panel id
"option password" to be the matching CnKuai control panel password
"option domain" to contain the domain
endef
define Build/Configure
endef
define Build/Compile
$(CP) ./files $(PKG_BUILD_DIR)
# ensure that VERSION inside dynamic_dns_functions.sh reflect PKG_VERSION of Makefile
$(SED) '/^VERSION=*/s/.*/VERSION="$(PKG_VERSION)-$(PKG_RELEASE)"/' $(PKG_BUILD_DIR)/files/dynamic_dns_functions.sh
# remove comments, white spaces and empty lines
for FILE in `find $(PKG_BUILD_DIR)/files -type f`; do \
$(SED) 's/^[[:space:]]*//' \
-e '/^#[[:space:]]\|^#$$$$/d' \
-e 's/[[:space:]]#[[:space:]].*$$$$//' \
-e 's/[[:space:]]*$$$$//' \
-e '/^\/\/[[:space:]]/d' \
-e '/^[[:space:]]*$$$$/d' $$$$FILE; \
done
endef
###### *************************************************************************
define Package/ddns-scripts/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/ddns-scripts/install
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.hotplug $(1)/etc/hotplug.d/iface/95-ddns
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.init $(1)/etc/init.d/ddns
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/files/ddns.config $(1)/etc/config/ddns
ddns-scripts: Update to Version 2.0.1-1 Squashed commit of the following: commit fc1d42f069ff930180c5f067c2eb88c9e9df7003 Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 18:01:43 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 commit 731f9b4df00a8f29df2c17f102356c4d6980918a Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:59:25 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 personal helper script to create hashes for CA-Certificates for Wget and cURL using https protocol without errors. Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit df8f6c9d5d31fde24fe1d673949d272d887505e1 Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:56:05 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 rewritten Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit 50cdf5acb9caecfd9b65ab79696c40fb2bc7037b Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:54:40 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 rewritten Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit b1d650a345fb06402c1eac01138cbafcca123a8c Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:52:52 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 not needed in this version Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit 9532114b03d428a3162b16e06706d3aa50e601bb Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:51:39 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 same function as existing services file but used for IPv6 Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit a636bc25c62e23694c009886c13253c9cecc548c Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:46:56 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 New file explaining availible parameters. Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit 52332354fc245861e17c898aa6b806f6c174e9a5 Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:44:45 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2014-09-22 07:59:19 +02:00
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/* \
$(1)/usr/share/ddns/services/
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dynamic_dns_*.sh $(1)/usr/lib/ddns
endef
define Package/ddns-scripts/postinst
#!/bin/sh
# if NOT run buildroot and PKG_UPGRADE then (re)start service if enabled
[ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] && {
[ -x /etc/uci-defaults/ddns ] && \
/etc/uci-defaults/ddns && \
rm -f /etc/uci-defaults/ddns >/dev/null 2>&1
/etc/init.d/ddns enabled && \
/etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
define Package/ddns-scripts/prerm
#!/bin/sh
if [ -n "$${IPKG_INSTROOT}" ]; then
ddns-scripts: Update to Version 2.0.1-1 Squashed commit of the following: commit fc1d42f069ff930180c5f067c2eb88c9e9df7003 Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 18:01:43 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 commit 731f9b4df00a8f29df2c17f102356c4d6980918a Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:59:25 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 personal helper script to create hashes for CA-Certificates for Wget and cURL using https protocol without errors. Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit df8f6c9d5d31fde24fe1d673949d272d887505e1 Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:56:05 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 rewritten Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit 50cdf5acb9caecfd9b65ab79696c40fb2bc7037b Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:54:40 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 rewritten Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit b1d650a345fb06402c1eac01138cbafcca123a8c Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:52:52 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 not needed in this version Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit 9532114b03d428a3162b16e06706d3aa50e601bb Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:51:39 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 same function as existing services file but used for IPv6 Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit a636bc25c62e23694c009886c13253c9cecc548c Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:46:56 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 New file explaining availible parameters. Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> commit 52332354fc245861e17c898aa6b806f6c174e9a5 Author: Christian Schoenebeck <christian.schoenebeck@gmail.com> Date: Sun Sep 21 17:44:45 2014 +0200 [ddns-scripts] Update to Version 2.0.1-1 Sorry GitHub web interface only supports single commits that will be summarized into one pull request. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2014-09-22 07:59:19 +02:00
/etc/init.d/ddns stop
/etc/init.d/ddns disable
fi
exit 0
endef
###### *************************************************************************
define Package/ddns-scripts_cloudflare.com-v4/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/ddns-scripts_cloudflare.com-v4/install
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) ./files/usr/lib/ddns/update_cloudflare_com_v4.sh \
$(1)/usr/lib/ddns
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/cloudflare.com-v4.json \
$(1)/usr/share/ddns/services/
endef
define Package/ddns-scripts_cloudflare.com-v4/postinst
#!/bin/sh
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
[ -x /etc/uci-defaults/ddns_cloudflare.com-v4 ] && \
/etc/uci-defaults/ddns_cloudflare.com-v4 && \
rm -f /etc/uci-defaults/ddns_cloudflare.com-v4 >/dev/null 2>&1
/etc/init.d/ddns enabled && \
/etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
define Package/ddns-scripts_cloudflare.com-v4/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
###### *************************************************************************
define Package/ddns-scripts_freedns_42_pl/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/ddns-scripts_freedns_42_pl/install
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) ./files/usr/lib/ddns/update_freedns_42_pl.sh \
$(1)/usr/lib/ddns
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/freedns.42.pl.json \
$(1)/usr/share/ddns/services
endef
define Package/ddns-scripts_freedns_42_pl/postinst
#!/bin/sh
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
[ -x /etc/uci-defaults/ddns_freedns_42_pl ] && \
/etc/uci-defaults/ddns_freedns_42_pl && \
rm -f /etc/uci-defaults/ddns_freedns_42_pl >/dev/null 2>&1
/etc/init.d/ddns enabled && \
/etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
define Package/ddns-scripts_freedns_42_pl/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
###### *************************************************************************
define Package/ddns-scripts_godaddy.com-v1/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/ddns-scripts_godaddy.com-v1/install
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) ./files/usr/lib/ddns/update_godaddy_com_v1.sh \
$(1)/usr/lib/ddns
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/godaddy.com-v1.json \
$(1)/usr/share/ddns/services
endef
define Package/ddns-scripts_godaddy.com-v1/postinst
#!/bin/sh
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
[ -x /etc/uci-defaults/ddns_godaddy.com-v1 ] && \
/etc/uci-defaults/ddns_godaddy.com-v1 && \
rm -f /etc/uci-defaults/ddns_godaddy.com-v1 >/dev/null 2>&1
/etc/init.d/ddns enabled \
&& /etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
define Package/ddns-scripts_godaddy.com-v1/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
###### *************************************************************************
define Package/ddns-scripts_digitalocean.com-v2/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/ddns-scripts_digitalocean.com-v2/install
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) ./files/usr/lib/ddns/update_digitalocean_com_v2.sh \
$(1)/usr/lib/ddns
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/digitalocean.com-v2.json \
$(1)/usr/share/ddns/services
endef
define Package/ddns-scripts_digitalocean.com-v2/postinst
#!/bin/sh
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
[ -x /etc/uci-defaults/ddns_digitalocean.com-v2 ] && \
/etc/uci-defaults/ddns_digitalocean.com-v2 && \
rm -f /etc/uci-defaults/ddns_digitalocean.com-v2 >/dev/null 2>&1
/etc/init.d/ddns enabled \
&& /etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
define Package/ddns-scripts_digitalocean.com-v2/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
###### *************************************************************************
define Package/ddns-scripts_no-ip_com/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/ddns-scripts_no-ip_com/install
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) ./files/usr/lib/ddns/update_no-ip_com.sh \
$(1)/usr/lib/ddns
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/no-ip.com.json \
$(1)/usr/share/ddns/services
endef
define Package/ddns-scripts_no-ip_com/postinst
#!/bin/sh
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
[ -x /etc/uci-defaults/ddns_no-ip_com ] && \
/etc/uci-defaults/ddns_no-ip_com && \
rm -f /etc/uci-defaults/ddns_no-ip_com >/dev/null 2>&1
/etc/init.d/ddns enabled && \
/etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
define Package/ddns-scripts_no-ip_com/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
###### *************************************************************************
define Package/ddns-scripts_nsupdate/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/ddns-scripts_nsupdate/install
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) ./files/usr/lib/ddns/update_nsupdate.sh \
$(1)/usr/lib/ddns
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/bind-nsupdate.json \
$(1)/usr/share/ddns/services
endef
define Package/ddns-scripts_nsupdate/postinst
#!/bin/sh
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
[ -x /etc/uci-defaults/ddns_nsupdate ] && \
/etc/uci-defaults/ddns_nsupdate && \
rm -f /etc/uci-defaults/ddns_nsupdate >/dev/null 2>&1
/etc/init.d/ddns enabled && \
/etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
define Package/ddns-scripts_nsupdate/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
###### *************************************************************************
define Package/ddns-scripts_route53-v1/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/ddns-scripts_route53-v1/install
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) ./files/usr/lib/ddns/update_route53_v1.sh \
$(1)/usr/lib/ddns
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/route53-v1.json \
$(1)/usr/share/ddns/services
endef
define Package/ddns-scripts_route53-v1/postinst
#!/bin/sh
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
[ -x /etc/uci-defaults/ddns_route53-v1 ] && \
/etc/uci-defaults/ddns_route53-v1 && \
rm -f /etc/uci-defaults/route53.com-v1 >/dev/null 2>&1
/etc/init.d/ddns enabled \
&& /etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
define Package/ddns-scripts_route53-v1/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
###### *************************************************************************
define Package/ddns-scripts_cnkuai_cn/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
define Package/ddns-scripts_cnkuai_cn/install
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) ./files/usr/lib/ddns/update_cnkuai_cn.sh \
$(1)/usr/lib/ddns
$(INSTALL_DIR) $(1)/usr/share/ddns/services
$(INSTALL_DATA) ./files/usr/share/ddns/services/cnkuai.cn.json \
$(1)/usr/share/ddns/services
endef
define Package/ddns-scripts_cnkuai_cn/postinst
#!/bin/sh
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
[ -x /etc/uci-defaults/ddns_cnkuai_cn ] && \
/etc/uci-defaults/ddns_cnkuai_cn && \
rm -f /etc/uci-defaults/cnkuai.cn >/dev/null 2>&1
/etc/init.d/ddns enabled \
&& /etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
define Package/ddns-scripts_cnkuai_cn/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
$(eval $(call BuildPackage,ddns-scripts))
$(eval $(call BuildPackage,ddns-scripts_cloudflare.com-v4))
$(eval $(call BuildPackage,ddns-scripts_freedns_42_pl))
$(eval $(call BuildPackage,ddns-scripts_godaddy.com-v1))
$(eval $(call BuildPackage,ddns-scripts_digitalocean.com-v2))
$(eval $(call BuildPackage,ddns-scripts_no-ip_com))
$(eval $(call BuildPackage,ddns-scripts_nsupdate))
$(eval $(call BuildPackage,ddns-scripts_route53-v1))
$(eval $(call BuildPackage,ddns-scripts_cnkuai_cn))