mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user