ddns-scripts: cleanup prerm scripts
authorFlorian Eckert <redacted>
Wed, 16 Sep 2020 13:39:18 +0000 (15:39 +0200)
committerFlorian Eckert <redacted>
Mon, 21 Sep 2020 08:17:01 +0000 (10:17 +0200)
Signed-off-by: Florian Eckert <redacted>
net/ddns-scripts/Makefile

index 1dfbe3d817c9645f331c4f8214ec7a1352ceaf8b..c856a422b980af58ed29b45d158a4b6bb40bdb51 100755 (executable)
@@ -229,10 +229,11 @@ define Package/ddns-scripts_cloudflare.com-v4/install
 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
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       /etc/init.d/ddns stop
+fi
+exit 0
 endef
 
 
@@ -247,10 +248,11 @@ define Package/ddns-scripts_freedns_42_pl/install
 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
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       /etc/init.d/ddns stop
+fi
+exit 0
 endef
 
 
@@ -265,10 +267,11 @@ define Package/ddns-scripts_godaddy.com-v1/install
 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
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       /etc/init.d/ddns stop
+fi
+exit 0
 endef
 
 
@@ -283,10 +286,11 @@ define Package/ddns-scripts_digitalocean.com-v2/install
 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
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       /etc/init.d/ddns stop
+fi
+exit 0
 endef
 
 
@@ -301,10 +305,11 @@ define Package/ddns-scripts_no-ip_com/install
 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
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       /etc/init.d/ddns stop
+fi
+exit 0
 endef
 
 
@@ -319,10 +324,11 @@ define Package/ddns-scripts_nsupdate/install
 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
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       /etc/init.d/ddns stop
+fi
+exit 0
 endef
 
 
@@ -337,10 +343,11 @@ define Package/ddns-scripts_route53-v1/install
 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
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       /etc/init.d/ddns stop
+fi
+exit 0
 endef
 
 
@@ -355,10 +362,11 @@ define Package/ddns-scripts_cnkuai_cn/install
 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
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       /etc/init.d/ddns stop
+fi
+exit 0
 endef
 
 
git clone https://git.99rst.org/PROJECT