2013-11-11 19:14:01 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-03-20 12:26:20 +00:00
|
|
|
commit=0
|
|
|
|
|
2013-11-11 19:14:01 +00:00
|
|
|
if [ -z "$(uci -q get uhttpd.main.ubus_prefix)" ]; then
|
|
|
|
uci set uhttpd.main.ubus_prefix=/ubus
|
2021-03-20 12:26:20 +00:00
|
|
|
commit=1
|
2013-11-11 19:14:01 +00:00
|
|
|
fi
|
2015-01-25 15:54:43 +00:00
|
|
|
|
2020-10-22 14:02:42 +00:00
|
|
|
[ "$(uci -q get uhttpd.main.ubus_socket)" = "/var/run/ubus.sock" ] && {
|
|
|
|
uci set uhttpd.main.ubus_socket='/var/run/ubus/ubus.sock'
|
2021-03-20 12:26:20 +00:00
|
|
|
commit=1
|
2020-10-22 14:02:42 +00:00
|
|
|
}
|
|
|
|
|
2021-03-20 12:26:20 +00:00
|
|
|
[ "$commit" = 1 ] && uci commit uhttpd && /etc/init.d/uhttpd reload
|
|
|
|
|
2015-01-25 15:54:43 +00:00
|
|
|
exit 0
|