nginx: adapt to changed ubus socket path
authorDaniel Golle <daniel@makrotopia.org>
Thu, 22 Oct 2020 14:44:01 +0000 (15:44 +0100)
committerHannu Nyman <hannu.nyman@iki.fi>
Thu, 29 Oct 2020 19:02:18 +0000 (21:02 +0200)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
net/nginx/Makefile
net/nginx/files-luci-support/60_nginx-luci-support

index 0b568739266422c079c71402e97157ff552094a3..0ad0d14887ff7d441c6dde06d899467185989173 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nginx
 PKG_VERSION:=1.19.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nginx.org/download/
index b1fe358246ee8ff3fd7fd7f994d8301c7ab925fa..b2564444ca684f151bbe10761632732ce63efa20 100644 (file)
@@ -6,13 +6,16 @@ if nginx -V 2>&1 | grep -q ubus; then
 
 location /ubus {
         ubus_interpreter;
-        ubus_socket_path /var/run/ubus.sock;
+        ubus_socket_path /var/run/ubus/ubus.sock;
         ubus_parallel_req 2;
 }
 EOT
        fi
 fi
 
+grep -q /var/run/ubus.sock /etc/nginx/conf.d/luci.locations &&
+       sed -i 's#/var/run/ubus.sock#/var/run/ubus/ubus.sock#' /etc/nginx/conf.d/luci.locations
+
 if [ -x /etc/init.d/uhttpd ]; then
         /etc/init.d/uhttpd disable
         if [ -n "$(pgrep uhttpd)" ]; then