Browse Source

nginx: adapt to changed ubus socket path

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
lilik-openwrt-22.03
Daniel Golle 4 years ago
committed by Hannu Nyman
parent
commit
c8bfe55026
2 changed files with 5 additions and 2 deletions
  1. +1
    -1
      net/nginx/Makefile
  2. +4
    -1
      net/nginx/files-luci-support/60_nginx-luci-support

+ 1
- 1
net/nginx/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=nginx PKG_NAME:=nginx
PKG_VERSION:=1.19.2 PKG_VERSION:=1.19.2
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://nginx.org/download/ PKG_SOURCE_URL:=https://nginx.org/download/


+ 4
- 1
net/nginx/files-luci-support/60_nginx-luci-support View File

@ -6,13 +6,16 @@ if nginx -V 2>&1 | grep -q ubus; then
location /ubus { location /ubus {
ubus_interpreter; ubus_interpreter;
ubus_socket_path /var/run/ubus.sock;
ubus_socket_path /var/run/ubus/ubus.sock;
ubus_parallel_req 2; ubus_parallel_req 2;
} }
EOT EOT
fi fi
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 if [ -x /etc/init.d/uhttpd ]; then
/etc/init.d/uhttpd disable /etc/init.d/uhttpd disable
if [ -n "$(pgrep uhttpd)" ]; then if [ -n "$(pgrep uhttpd)" ]; then


Loading…
Cancel
Save