summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/network/services/uhttpd/Makefile9
-rw-r--r--package/network/services/uhttpd/files/ubus.default6
2 files changed, 8 insertions, 7 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/
diff --git a/package/network/services/uhttpd/files/ubus.default b/package/network/services/uhttpd/files/ubus.default
index 474016c1c5..d0a218a0ad 100644
--- a/package/network/services/uhttpd/files/ubus.default
+++ b/package/network/services/uhttpd/files/ubus.default
@@ -1,17 +1,11 @@
#!/bin/sh
-commit=0
-
if [ -z "$(uci -q get uhttpd.main.ubus_prefix)" ]; then
uci set uhttpd.main.ubus_prefix=/ubus
- commit=1
fi
[ "$(uci -q get uhttpd.main.ubus_socket)" = "/var/run/ubus.sock" ] && {
uci set uhttpd.main.ubus_socket='/var/run/ubus/ubus.sock'
- commit=1
}
-[ "$commit" = 1 ] && uci commit uhttpd && /etc/init.d/uhttpd reload
-
exit 0