build: reload rpcd in package postinstall
authorJo-Philipp Wich <jo@mein.io>
Tue, 3 Mar 2020 08:28:44 +0000 (09:28 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 19 May 2020 10:41:35 +0000 (12:41 +0200)
Send a SIGHUP to rpcd after installing LuCI packages to reload ACL rules.

Also remove redundant code while we're at it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit ca558f4f93451de7afb2a85c017051cb807b3329)

luci.mk

diff --git a/luci.mk b/luci.mk
index 2c12688844dc222b7fb67f7e72e2f4a277f41284..d1edb54117a5f1d0177001b7b9e3104933920c22 100644 (file)
--- a/luci.mk
+++ b/luci.mk
@@ -225,6 +225,9 @@ ifneq ($(LUCI_DEFAULTS),)
 define Package/$(PKG_NAME)/postinst
 [ -n "$${IPKG_INSTROOT}" ] || {$(foreach script,$(LUCI_DEFAULTS),
        (. /etc/uci-defaults/$(script)) && rm -f /etc/uci-defaults/$(script))
+       rm -f /tmp/luci-indexcache
+       rm -rf /tmp/luci-modulecache/
+       killall -HUP rpcd 2>/dev/null
        exit 0
 }
 endef