You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

396 lines
15 KiB

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>
10 years ago
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>
10 years ago
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>
10 years ago
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>
10 years ago
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>
10 years ago
  1. #
  2. # Copyright (C) 2008-2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=ddns-scripts
  8. # Version == major.minor.patch
  9. # increase on new functionality (minor) or patches (patch)
  10. PKG_VERSION:=2.7.6
  11. # Release == build
  12. # increase on changes of services files or tld_names.dat
  13. PKG_RELEASE:=10
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
  16. include $(INCLUDE_DIR)/package.mk
  17. # no default dependencies
  18. PKG_DEFAULT_DEPENDS=
  19. define Package/$(PKG_NAME)/Default
  20. SECTION:=net
  21. CATEGORY:=Network
  22. SUBMENU:=IP Addresses and Names
  23. PKGARCH:=all
  24. endef
  25. ###### *************************************************************************
  26. define Package/$(PKG_NAME)
  27. $(call Package/$(PKG_NAME)/Default)
  28. TITLE:=Dynamic DNS Client scripts (with IPv6 support)
  29. endef
  30. # shown in LuCI package description
  31. define Package/$(PKG_NAME)/description
  32. Dynamic DNS Client scripts (with IPv6 support) - Info: http://wiki.openwrt.org/doc/howto/ddns.client
  33. endef
  34. # shown in menuconfig <Help>
  35. define Package/$(PKG_NAME)/config
  36. help
  37. A highly configurable set of scripts for doing dynamic dns updates.
  38. - IPv6 support
  39. - DNS server support
  40. - Glue Record support (require BIND host or KNOT host)
  41. - DNS requests via TCP
  42. - Proxy server support
  43. - log file support
  44. - support to run once
  45. Version: $(PKG_VERSION)-$(PKG_RELEASE)
  46. Info : http://wiki.openwrt.org/doc/howto/ddns.client
  47. endef
  48. ###### *************************************************************************
  49. define Package/$(PKG_NAME)_cloudflare
  50. $(call Package/$(PKG_NAME)/Default)
  51. TITLE:=CloudFlare.com API v1 (deprecated)
  52. DEPENDS:=$(PKG_NAME)
  53. endef
  54. define Package/$(PKG_NAME)_cloudflare/description
  55. Dynamic DNS Client scripts extension for CloudFlare.com API-v1 (deprecated)
  56. endef
  57. ###### *************************************************************************
  58. define Package/$(PKG_NAME)_cloudflare.com-v4
  59. $(call Package/$(PKG_NAME)/Default)
  60. TITLE:=CloudFlare.com API v4 (require cURL)
  61. DEPENDS:=$(PKG_NAME) +curl
  62. endef
  63. define Package/$(PKG_NAME)_cloudflare.com-v4/description
  64. Dynamic DNS Client scripts extension for CloudFlare.com API-v4 (require/install cURL)
  65. endef
  66. ###### *************************************************************************
  67. define Package/$(PKG_NAME)_godaddy.com-v1
  68. $(call Package/$(PKG_NAME)/Default)
  69. TITLE:=GoDaddy.com (require cURL)
  70. DEPENDS:=$(PKG_NAME) +curl
  71. endef
  72. define Package/$(PKG_NAME)_godaddy.com-v1/description
  73. Dynamic DNS Client scripts extension for GoDaddy.com (require/install cURL)
  74. endef
  75. ###### *************************************************************************
  76. define Package/$(PKG_NAME)_no-ip_com
  77. $(call Package/$(PKG_NAME)/Default)
  78. TITLE:=DDNS extension for No-IP.com
  79. DEPENDS:=$(PKG_NAME)
  80. endef
  81. define Package/$(PKG_NAME)_no-ip_com/description
  82. Dynamic DNS Client scripts extension for No-IP.com
  83. endef
  84. ###### *************************************************************************
  85. define Package/$(PKG_NAME)_nsupdate
  86. $(call Package/$(PKG_NAME)/Default)
  87. TITLE:=DDNS extension using Bind nsupdate
  88. DEPENDS:=$(PKG_NAME) +bind-client
  89. endef
  90. define Package/$(PKG_NAME)_nsupdate/description
  91. Dynamic DNS Client scripts extension for direct updates using Bind nsupdate
  92. endef
  93. define Package/$(PKG_NAME)_nsupdate/config
  94. help
  95. The script directly updates a PowerDNS (or maybe bind server) via nsupdate
  96. from bind-client package. It requires
  97. "option dns_server" to be set to the server to be used by nsupdate.
  98. "option username" should be set to the key name and
  99. "option password" to the base64 encoded shared secret.
  100. endef
  101. ###### *************************************************************************
  102. define Build/Configure
  103. endef
  104. define Build/Compile
  105. $(CP) ./files $(PKG_BUILD_DIR)
  106. # ensure that VERSION inside dynamic_dns_functions.sh reflect PKG_VERSION of Makefile
  107. $(SED) '/^VERSION=*/s/.*/VERSION="$(PKG_VERSION)-$(PKG_RELEASE)"/' $(PKG_BUILD_DIR)/files/dynamic_dns_functions.sh
  108. # remove comments, white spaces and empty lines
  109. for FILE in `find $(PKG_BUILD_DIR)/files -type f`; do \
  110. $(SED) 's/^[[:space:]]*//' \
  111. -e '/^#[[:space:]]\|^#$$$$/d' \
  112. -e 's/[[:space:]]#[[:space:]].*$$$$//' \
  113. -e 's/[[:space:]]*$$$$//' \
  114. -e '/^\/\/[[:space:]]/d' \
  115. -e '/^[[:space:]]*$$$$/d' $$$$FILE; \
  116. done
  117. # compress public_suffix_list.dat
  118. gzip -f9 $(PKG_BUILD_DIR)/files/public_suffix_list.dat
  119. endef
  120. define Package/$(PKG_NAME)/conffiles
  121. /etc/config/ddns
  122. endef
  123. ###### *************************************************************************
  124. define Package/$(PKG_NAME)/preinst
  125. #!/bin/sh
  126. # if NOT run buildroot then stop service
  127. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  128. exit 0 # suppress errors
  129. endef
  130. define Package/$(PKG_NAME)/install
  131. $(INSTALL_DIR) $(1)/etc/uci-defaults
  132. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns
  133. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  134. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.hotplug $(1)/etc/hotplug.d/iface/95-ddns
  135. $(INSTALL_DIR) $(1)/etc/init.d
  136. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.init $(1)/etc/init.d/ddns
  137. $(INSTALL_DIR) $(1)/etc/config
  138. $(INSTALL_CONF) $(PKG_BUILD_DIR)/files/ddns.config $(1)/etc/config/ddns
  139. $(INSTALL_DIR) $(1)/etc/ddns
  140. $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/services* $(1)/etc/ddns
  141. $(INSTALL_DIR) $(1)/usr/lib/ddns
  142. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dynamic_dns_*.sh $(1)/usr/lib/ddns
  143. endef
  144. define Package/$(PKG_NAME)/postinst
  145. #!/bin/sh
  146. # if NOT run buildroot and PKG_UPGRADE then (re)start service if enabled
  147. [ -z "$${IPKG_INSTROOT}" -a "$${PKG_UPGRADE}" = "1" ] && {
  148. [ -x /etc/uci-defaults/ddns ] && \
  149. /etc/uci-defaults/ddns && \
  150. rm -f /etc/uci-defaults/ddns >/dev/null 2>&1
  151. /etc/init.d/ddns enabled && \
  152. /etc/init.d/ddns start >/dev/null 2>&1
  153. }
  154. exit 0 # suppress errors
  155. endef
  156. define Package/$(PKG_NAME)/prerm
  157. #!/bin/sh
  158. # if run within buildroot exit
  159. [ -n "$${IPKG_INSTROOT}" ] && exit 0
  160. # stop running scripts
  161. /etc/init.d/ddns stop
  162. /etc/init.d/ddns disable
  163. # clear LuCI indexcache
  164. rm -f /tmp/luci-indexcache >/dev/null 2>&1
  165. exit 0 # suppress errors
  166. endef
  167. ###### *************************************************************************
  168. define Package/$(PKG_NAME)_cloudflare/preinst
  169. #!/bin/sh
  170. # if NOT run buildroot then stop service
  171. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  172. exit 0 # suppress errors
  173. endef
  174. define Package/$(PKG_NAME)_cloudflare/install
  175. $(INSTALL_DIR) $(1)/etc/uci-defaults
  176. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare
  177. $(INSTALL_DIR) $(1)/usr/share
  178. $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/public_suffix_list.dat.gz $(1)/usr/share
  179. $(INSTALL_DIR) $(1)/usr/lib/ddns
  180. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v1.sh $(1)/usr/lib/ddns
  181. endef
  182. define Package/$(PKG_NAME)_cloudflare/postinst
  183. #!/bin/sh
  184. # remove old services file entries
  185. /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  186. /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
  187. # and create new
  188. printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
  189. printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
  190. # on real system restart service if enabled
  191. [ -z "$${IPKG_INSTROOT}" ] && {
  192. [ -x /etc/uci-defaults/ddns_cloudflare ] && \
  193. /etc/uci-defaults/ddns_cloudflare && \
  194. rm -f /etc/uci-defaults/ddns_cloudflare >/dev/null 2>&1
  195. /etc/init.d/ddns enabled && \
  196. /etc/init.d/ddns start >/dev/null 2>&1
  197. }
  198. exit 0 # suppress errors
  199. endef
  200. define Package/$(PKG_NAME)_cloudflare/prerm
  201. #!/bin/sh
  202. # if NOT run buildroot then stop service
  203. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  204. # remove services file entries
  205. /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  206. /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
  207. exit 0 # suppress errors
  208. endef
  209. ###### *************************************************************************
  210. define Package/$(PKG_NAME)_cloudflare.com-v4/preinst
  211. #!/bin/sh
  212. # if NOT run buildroot then stop service
  213. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  214. exit 0 # suppress errors
  215. endef
  216. define Package/$(PKG_NAME)_cloudflare.com-v4/install
  217. $(INSTALL_DIR) $(1)/etc/uci-defaults
  218. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare.com-v4
  219. $(INSTALL_DIR) $(1)/usr/lib/ddns
  220. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v4.sh $(1)/usr/lib/ddns
  221. endef
  222. define Package/$(PKG_NAME)_cloudflare.com-v4/postinst
  223. #!/bin/sh
  224. # remove old services file entries
  225. /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  226. /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
  227. # and create new
  228. printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
  229. printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
  230. # on real system restart service if enabled
  231. [ -z "$${IPKG_INSTROOT}" ] && {
  232. [ -x /etc/uci-defaults/ddns_cloudflare.com-v4 ] && \
  233. /etc/uci-defaults/ddns_cloudflare.com-v4 && \
  234. rm -f /etc/uci-defaults/ddns_cloudflare.com-v4 >/dev/null 2>&1
  235. /etc/init.d/ddns enabled && \
  236. /etc/init.d/ddns start >/dev/null 2>&1
  237. }
  238. exit 0 # suppress errors
  239. endef
  240. define Package/$(PKG_NAME)_cloudflare.com-v4/prerm
  241. #!/bin/sh
  242. # if NOT run buildroot then stop service
  243. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  244. # remove services file entries
  245. /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  246. /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
  247. exit 0 # suppress errors
  248. endef
  249. ###### *************************************************************************
  250. define Package/$(PKG_NAME)_godaddy.com-v1/preinst
  251. #!/bin/sh
  252. # if NOT run buildroot then stop service
  253. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  254. exit 0 # suppress errors
  255. endef
  256. define Package/$(PKG_NAME)_godaddy.com-v1/install
  257. $(INSTALL_DIR) $(1)/etc/uci-defaults
  258. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_godaddy.com-v1
  259. $(INSTALL_DIR) $(1)/usr/lib/ddns
  260. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_godaddy_com_v1.sh $(1)/usr/lib/ddns
  261. endef
  262. define Package/$(PKG_NAME)_godaddy.com-v1/postinst
  263. #!/bin/sh
  264. # remove old services file entries
  265. /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  266. /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
  267. # and create new
  268. printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
  269. printf "%s\\t%s\\n" '"godaddy.com-v1"' '"update_godaddy_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
  270. # on real system restart service if enabled
  271. [ -z "$${IPKG_INSTROOT}" ] && {
  272. [ -x /etc/uci-defaults/ddns_godaddy.com-v1 ] && \
  273. /etc/uci-defaults/ddns_godaddy.com-v1 && \
  274. rm -f /etc/uci-defaults/ddns_godaddy.com-v1 >/dev/null 2>&1
  275. /etc/init.d/ddns enabled \
  276. && /etc/init.d/ddns start >/dev/null 2>&1
  277. }
  278. exit 0 # suppress errors
  279. endef
  280. define Package/$(PKG_NAME)_godaddy.com-v1/prerm
  281. #!/bin/sh
  282. # if NOT run buildroot then stop service
  283. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  284. # remove services file entries
  285. /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  286. /bin/sed -i '/godaddy\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
  287. exit 0 # suppress errors
  288. endef
  289. ###### *************************************************************************
  290. define Package/$(PKG_NAME)_no-ip_com/preinst
  291. #!/bin/sh
  292. # if NOT run buildroot then stop service
  293. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  294. exit 0 # suppress errors
  295. endef
  296. define Package/$(PKG_NAME)_no-ip_com/install
  297. $(INSTALL_DIR) $(1)/etc/uci-defaults
  298. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_no-ip_com
  299. $(INSTALL_DIR) $(1)/usr/lib/ddns
  300. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_no-ip_com.sh $(1)/usr/lib/ddns
  301. endef
  302. define Package/$(PKG_NAME)_no-ip_com/postinst
  303. #!/bin/sh
  304. # remove old services file entries
  305. /bin/sed -i '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  306. # and create new
  307. printf "%s\\t%s\\n" '"no-ip.com"' '"update_no-ip_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
  308. # on real system restart service if enabled
  309. [ -z "$${IPKG_INSTROOT}" ] && {
  310. [ -x /etc/uci-defaults/ddns_no-ip_com ] && \
  311. /etc/uci-defaults/ddns_no-ip_com && \
  312. rm -f /etc/uci-defaults/ddns_no-ip_com >/dev/null 2>&1
  313. /etc/init.d/ddns enabled && \
  314. /etc/init.d/ddns start >/dev/null 2>&1
  315. }
  316. exit 0 # suppress errors
  317. endef
  318. define Package/$(PKG_NAME)_no-ip_com/prerm
  319. #!/bin/sh
  320. # if NOT run buildroot then stop service
  321. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  322. # remove services file entries
  323. /bin/sed -i '/no-ip\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  324. exit 0 # suppress errors
  325. endef
  326. ###### *************************************************************************
  327. define Package/$(PKG_NAME)_nsupdate/preinst
  328. #!/bin/sh
  329. # if NOT run buildroot then stop service
  330. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  331. exit 0 # suppress errors
  332. endef
  333. define Package/$(PKG_NAME)_nsupdate/install
  334. $(INSTALL_DIR) $(1)/etc/uci-defaults
  335. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_nsupdate
  336. $(INSTALL_DIR) $(1)/usr/lib/ddns
  337. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_nsupdate.sh $(1)/usr/lib/ddns
  338. endef
  339. define Package/$(PKG_NAME)_nsupdate/postinst
  340. #!/bin/sh
  341. # remove old services file entries
  342. /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  343. /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
  344. # and create new
  345. printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
  346. printf "%s\\t%s\\n" '"bind-nsupdate"' '"update_nsupdate.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
  347. # on real system restart service if enabled
  348. [ -z "$${IPKG_INSTROOT}" ] && {
  349. [ -x /etc/uci-defaults/ddns_nsupdate ] && \
  350. /etc/uci-defaults/ddns_nsupdate && \
  351. rm -f /etc/uci-defaults/ddns_nsupdate >/dev/null 2>&1
  352. /etc/init.d/ddns enabled && \
  353. /etc/init.d/ddns start >/dev/null 2>&1
  354. }
  355. exit 0 # suppress errors
  356. endef
  357. define Package/$(PKG_NAME)_nsupdate/prerm
  358. #!/bin/sh
  359. # if NOT run buildroot then stop service
  360. [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
  361. # remove services file entries
  362. /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
  363. /bin/sed -i '/bind-nsupdate/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
  364. exit 0 # suppress errors
  365. endef
  366. ###### *************************************************************************
  367. $(eval $(call BuildPackage,$(PKG_NAME)))
  368. $(eval $(call BuildPackage,$(PKG_NAME)_cloudflare))
  369. $(eval $(call BuildPackage,$(PKG_NAME)_cloudflare.com-v4))
  370. $(eval $(call BuildPackage,$(PKG_NAME)_godaddy.com-v1))
  371. $(eval $(call BuildPackage,$(PKG_NAME)_no-ip_com))
  372. $(eval $(call BuildPackage,$(PKG_NAME)_nsupdate))