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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user