diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2018-07-13 18:14:21 +0200 |
---|---|---|
committer | Ansuel Smith <ansuelsmth@gmail.com> | 2018-07-14 23:40:26 +0200 |
commit | 433e0fe7714574d401f2978391dd5ce3d4a4a78d (patch) | |
tree | 3fe10aa5d495f3597f010ea5a79f427fe3bc7158 /net/nginx | |
parent | 3fdef4e2f309aeec69686e02a29f1f8cb1b4618b (diff) |
nginx: fix bug in uci-defaults scripts
Currently the uci-defaults scripts reset nginx config even it they are valid due to a bug in the if condition.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'net/nginx')
-rw-r--r-- | net/nginx/Makefile | 2 | ||||
-rw-r--r-- | net/nginx/files-luci-support/60_nginx-luci-support | 4 | ||||
-rw-r--r-- | net/nginx/files-luci-support/70_nginx-luci-support-ssl | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/net/nginx/Makefile b/net/nginx/Makefile index be2a857a9..86588b240 100644 --- a/net/nginx/Makefile +++ b/net/nginx/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nginx PKG_VERSION:=1.15.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://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 38a8aa885..dd076d260 100644 --- a/net/nginx/files-luci-support/60_nginx-luci-support +++ b/net/nginx/files-luci-support/60_nginx-luci-support @@ -1,7 +1,7 @@ #!/bin/sh if [ -f "/etc/nginx/luci_nginx.conf" ] && [ -f "/etc/nginx/nginx.conf" ]; then - if [ ! "$(cat '/etc/nginx/nginx.conf' | grep -q 'luci_uwsgi.conf')" ]; then + if [ ! "$(cat '/etc/nginx/nginx.conf' | grep 'luci_uwsgi.conf')" ]; then mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf_old mv /etc/nginx/luci_nginx.conf /etc/nginx/nginx.conf core_number=$(grep -c ^processor /proc/cpuinfo) @@ -20,6 +20,8 @@ if [ -f "/etc/nginx/luci_nginx.conf" ] && [ -f "/etc/nginx/nginx.conf" ]; then else /etc/init.d/uwsgi start fi + else + rm /etc/nginx/luci_nginx.conf fi fi diff --git a/net/nginx/files-luci-support/70_nginx-luci-support-ssl b/net/nginx/files-luci-support/70_nginx-luci-support-ssl index 1cc1a85fc..76ce3a819 100644 --- a/net/nginx/files-luci-support/70_nginx-luci-support-ssl +++ b/net/nginx/files-luci-support/70_nginx-luci-support-ssl @@ -2,7 +2,7 @@ if [ -f "/etc/nginx/luci_nginx_ssl.conf" ] && [ -f "/etc/nginx/nginx.conf" ]; then - if [ ! "$(cat '/etc/nginx/nginx.conf' | grep -q 'return 301 https://$host$request_uri;')" ]; then + if [ ! "$(cat '/etc/nginx/nginx.conf' | grep 'return 301 https://$host$request_uri;')" ]; then if [ -f "/etc/nginx/nginx.conf_old" ]; then rm /etc/nginx/nginx.conf else @@ -16,6 +16,8 @@ if [ -f "/etc/nginx/luci_nginx_ssl.conf" ] && [ -f "/etc/nginx/nginx.conf" ]; th else /etc/init.d/nginx start fi + else + rm /etc/nginx/luci_nginx_ssl.conf fi fi |