diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2023-12-27 16:20:45 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2024-01-10 17:06:56 +0100 |
commit | 1f11a4e28336c07aca61dd3b4fef01ef872a362d (patch) | |
tree | 415cc07a9adfa5f105b9ac91c3817bdd6dfba549 /package/network/services/uhttpd/Makefile | |
parent | e691e2b302d98d4239ffbfced0759384592ea995 (diff) | |
download | openwrt-1f11a4e28336c07aca61dd3b4fef01ef872a362d.tar.gz openwrt-1f11a4e28336c07aca61dd3b4fef01ef872a362d.tar.bz2 openwrt-1f11a4e28336c07aca61dd3b4fef01ef872a362d.zip |
uhttpd: handle reload after uhttpd-mod-ubus installation using postinst
Use postinst script to reload service instead of uci-defaults hack. It's
possible thanks to recent base-files change that executes postinst after
uci-defaults.
This fixes support for uhttpd customizations. It's possible (again) to
adjust uhttpd config with custom uci-defaults before it gets started.
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Fixes: d25d281fd668 ("uhttpd: Reload config after uhttpd-mod-ubus was added")
Ref: b799dd3c705d ("base-files: execute package's "postinst" after executing uci-defaults")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/network/services/uhttpd/Makefile')
-rw-r--r-- | package/network/services/uhttpd/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 02a02405fd..37117bf911 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git @@ -107,6 +107,13 @@ define Package/uhttpd-mod-ubus/install $(INSTALL_DATA) ./files/ubus.default $(1)/etc/uci-defaults/00_uhttpd_ubus endef +define Package/uhttpd-mod-ubus/postinst +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + /etc/init.d/uhttpd reload +fi +endef + define Package/uhttpd-mod-ucode/install $(INSTALL_DIR) $(1)/usr/lib $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ucode.so $(1)/usr/lib/ |