ddns-scripts: cleanup postinst script
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 16 Sep 2020 13:28:51 +0000 (15:28 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Mon, 21 Sep 2020 08:17:01 +0000 (10:17 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/ddns-scripts/Makefile

index d50c106bc850597ae90819b81f031bb8d99ae40d..f1c430c46d273b10bb8c059466f48dcc4b1bb880 100755 (executable)
@@ -200,16 +200,12 @@ define Package/ddns-scripts/install
 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
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       /etc/init.d/ddns enabled
+       /etc/init.d/ddns start
+fi
+exit 0
 endef
 
 define Package/ddns-scripts/prerm