uhttpd: adapt defaults for changes ubus.sock path
authorDaniel Golle <daniel@makrotopia.org>
Thu, 22 Oct 2020 14:02:42 +0000 (15:02 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 22 Oct 2020 14:13:38 +0000 (15:13 +0100)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/network/services/uhttpd/Makefile
package/network/services/uhttpd/files/ubus.default
package/network/services/uhttpd/files/uhttpd.config

index dbade36b0abe0bbdcf14dee541c7c8a0262aefc9..83073122e63232461af25f5df90afea1a9873bc1 100644 (file)
@@ -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
index f0f71e9d35176a19b0cf9c2451b9bbc3e99b7ef5..ca9e72a3150a3f8a0339fdd8b7030ad173bfdd82 100644 (file)
@@ -5,4 +5,9 @@ if [ -z "$(uci -q get uhttpd.main.ubus_prefix)" ]; then
        uci commit uhttpd
 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
+}
+
 exit 0
index 39089ca25b34bfdcc065682360030e3d3d6433ac..f368d08e8bc703c7ec43fbabdd7cb0bfdfc6c395 100644 (file)
@@ -59,7 +59,7 @@ config uhttpd main
 
        # Specify the ubus-rpc prefix and socket path.
 #      option ubus_prefix      /ubus
-#      option ubus_socket      /var/run/ubus.sock
+#      option ubus_socket      /var/run/ubus/ubus.sock
 
        # CGI/Lua timeout, if the called script does not
        # write data within the given amount of seconds,