From c8bfe55026efbf2b9b467a096493d07b1aa6e3b1 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 22 Oct 2020 15:44:01 +0100 Subject: [PATCH] nginx: adapt to changed ubus socket path Signed-off-by: Daniel Golle --- net/nginx/Makefile | 2 +- net/nginx/files-luci-support/60_nginx-luci-support | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/nginx/Makefile b/net/nginx/Makefile index 0b5687392..0ad0d1488 100644 --- a/net/nginx/Makefile +++ b/net/nginx/Makefile @@ -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/ diff --git a/net/nginx/files-luci-support/60_nginx-luci-support b/net/nginx/files-luci-support/60_nginx-luci-support index b1fe35824..b2564444c 100644 --- a/net/nginx/files-luci-support/60_nginx-luci-support +++ b/net/nginx/files-luci-support/60_nginx-luci-support @@ -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