mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
d25d281fd6
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>
16 lines
343 B
Bash
16 lines
343 B
Bash
#!/bin/sh
|
|
|
|
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
|