aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2021-03-20 13:19:22 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2021-03-21 22:39:27 +0100
commit97a4d27fb5707d3a0b943f2af326b04d26f98731 (patch)
treedf27dd2bceca3b41430ef784e25b14a62d35f7f1
parent69b4a11aedeb799cae97807ca932875d7c938645 (diff)
downloadupstream-97a4d27fb5707d3a0b943f2af326b04d26f98731.tar.gz
upstream-97a4d27fb5707d3a0b943f2af326b04d26f98731.tar.bz2
upstream-97a4d27fb5707d3a0b943f2af326b04d26f98731.zip
uhttpd: Reload config after uhttpd-mod-ubus was added
Without this change the config is only committed, but the uhttpd daemon is not reloaded. This reload is needed to apply the config. Without the reload of uhttpd, the ubus server is not available over http and returns a Error 404. This caused problems when installing luci on the snapshots and accessing it without reloading uhttpd. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit d25d281fd6686bda67636f6c1df918145b6cb738)
-rw-r--r--package/network/services/uhttpd/Makefile2
-rw-r--r--package/network/services/uhttpd/files/ubus.default2
2 files changed, 3 insertions, 1 deletions
diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile
index 796eb61298..28a817d2e0 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
diff --git a/package/network/services/uhttpd/files/ubus.default b/package/network/services/uhttpd/files/ubus.default
index ca9e72a315..b218d3f85d 100644
--- a/package/network/services/uhttpd/files/ubus.default
+++ b/package/network/services/uhttpd/files/ubus.default
@@ -3,11 +3,13 @@
if [ -z "$(uci -q get uhttpd.main.ubus_prefix)" ]; then
uci set uhttpd.main.ubus_prefix=/ubus
uci commit uhttpd
+ /etc/init.d/uhttpd reload
fi
[ "$(uci -q get uhttpd.main.ubus_socket)" = "/var/run/ubus.sock" ] && {
uci set uhttpd.main.ubus_socket='/var/run/ubus/ubus.sock'
uci commit uhttpd
+ /etc/init.d/uhttpd reload
}
exit 0