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)
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