|
10 | 10 | include $(INCLUDE_DIR)/package.mk
|
11 | 11 |
|
12 | 12 | define Package/$(PKG_NAME)
|
13 |
| - SECTION:=net |
14 |
| - CATEGORY:=Network |
15 |
| - SUBMENU:=IP Addresses and Names |
16 |
| - TITLE:=DDNS extension for AliYun.com |
17 |
| - PKGARCH:=all |
18 |
| - DEPENDS:=+ddns-scripts +wget +openssl-util |
| 13 | + SECTION:=net |
| 14 | + CATEGORY:=Network |
| 15 | + SUBMENU:=IP Addresses and Names |
| 16 | + TITLE:=DDNS extension for AliYun.com |
| 17 | + PKGARCH:=all |
| 18 | + DEPENDS:=+ddns-scripts +wget +openssl-util |
19 | 19 | endef
|
20 | 20 |
|
21 | 21 | define Package/$(PKG_NAME)/description
|
22 |
| - Dynamic DNS Client scripts extension for AliYun.com |
| 22 | + Dynamic DNS Client scripts extension for AliYun.com |
23 | 23 | endef
|
24 | 24 |
|
25 | 25 | define Build/Configure
|
26 | 26 | endef
|
27 | 27 |
|
28 | 28 | define Build/Compile
|
29 |
| - $(CP) ./*.{sh,json} $(PKG_BUILD_DIR) |
| 29 | + $(CP) ./*.{sh,json} $(PKG_BUILD_DIR) |
30 | 30 | endef
|
31 | 31 |
|
32 | 32 | define Package/$(PKG_NAME)/preinst
|
33 |
| - #!/bin/sh |
34 |
| - # if NOT run buildroot then stop service |
35 |
| - [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 |
36 |
| - exit 0 # suppress errors |
| 33 | + #!/bin/sh |
| 34 | + # if NOT run buildroot then stop service |
| 35 | + [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 |
| 36 | + exit 0 # suppress errors |
37 | 37 | endef
|
38 | 38 |
|
39 | 39 | define Package/$(PKG_NAME)/install
|
40 |
| - $(INSTALL_DIR) $(1)/usr/lib/ddns |
41 |
| - $(INSTALL_BIN) $(PKG_BUILD_DIR)/update_aliyun_com.sh $(1)/usr/lib/ddns |
42 |
| - $(INSTALL_DIR) $(1)/usr/share/ddns/default |
43 |
| - $(INSTALL_BIN) $(PKG_BUILD_DIR)/aliyun.com.json $(1)/usr/share/ddns/default |
| 40 | + $(INSTALL_DIR) $(1)/usr/lib/ddns |
| 41 | + $(INSTALL_BIN) $(PKG_BUILD_DIR)/update_aliyun_com.sh $(1)/usr/lib/ddns |
| 42 | + $(INSTALL_DIR) $(1)/usr/share/ddns/default |
| 43 | + $(INSTALL_BIN) $(PKG_BUILD_DIR)/aliyun.com.json $(1)/usr/share/ddns/default |
44 | 44 |
|
45 | 45 | endef
|
46 | 46 |
|
47 | 47 | define Package/$(PKG_NAME)/postinst
|
48 |
| - #!/bin/sh |
49 |
| - # remove old services file entries |
50 |
| - /bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 |
51 |
| - /bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 |
52 |
| - # and create new |
53 |
| - printf "%s\\t\\t%s\\n" '"aliyun.com"' '"update_aliyun_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services |
54 |
| - printf "%s\\t\\t%s\\n" '"aliyun.com"' '"update_aliyun_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 |
55 |
| - # on real system restart service if enabled |
56 |
| - [ -z "$${IPKG_INSTROOT}" ] && { |
57 |
| - /etc/init.d/ddns enabled && \ |
58 |
| - /etc/init.d/ddns start >/dev/null 2>&1 |
59 |
| - } |
60 |
| - exit 0 # suppress errors |
| 48 | + #!/bin/sh |
| 49 | + # remove old services file entries |
| 50 | + /bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 |
| 51 | + /bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 |
| 52 | + # and create new |
| 53 | + printf "%s\\t\\t%s\\n" '"aliyun.com"' '"update_aliyun_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services |
| 54 | + printf "%s\\t\\t%s\\n" '"aliyun.com"' '"update_aliyun_com.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6 |
| 55 | + # on real system restart service if enabled |
| 56 | + [ -z "$${IPKG_INSTROOT}" ] && { |
| 57 | + /etc/init.d/ddns enabled && \ |
| 58 | + /etc/init.d/ddns start >/dev/null 2>&1 |
| 59 | + } |
| 60 | + exit 0 # suppress errors |
61 | 61 | endef
|
62 | 62 |
|
63 | 63 | define Package/$(PKG_NAME)/prerm
|
64 |
| - #!/bin/sh |
65 |
| - # if NOT run buildroot then stop service |
66 |
| - [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 |
67 |
| - # remove services file entries |
68 |
| - /bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 |
69 |
| - /bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 |
70 |
| - exit 0 # suppress errors |
| 64 | + #!/bin/sh |
| 65 | + # if NOT run buildroot then stop service |
| 66 | + [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1 |
| 67 | + # remove services file entries |
| 68 | + /bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1 |
| 69 | + /bin/sed -i '/aliyun\.com/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1 |
| 70 | + exit 0 # suppress errors |
71 | 71 | endef
|
72 | 72 |
|
73 | 73 | $(eval $(call BuildPackage,$(PKG_NAME)))
|
0 commit comments