mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
Merge pull request #6929 from Ansuel/ariang
ariang: fix nginx support script logic
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
|
|
||||||
if [ -f "/etc/nginx/nginx.conf" ] && [ -f "/etc/nginx/ariang.conf" ]; then
|
if [ -f "/etc/nginx/nginx.conf" ] && [ -f "/etc/nginx/ariang.conf" ]; then
|
||||||
if [ ! "$(cat '/etc/nginx/nginx.conf' | grep -q 'server_name localhost;')" ]; then
|
if [ "$( grep 'server_name localhost;' < /etc/nginx/nginx.conf)" ] &&
|
||||||
|
[ ! "$( grep 'include ariang.conf;' < /etc/nginx/nginx.conf)" ]; then
|
||||||
sed -i '/server_name localhost;/a \\t\tinclude ariang.conf;' /etc/nginx/nginx.conf
|
sed -i '/server_name localhost;/a \\t\tinclude ariang.conf;' /etc/nginx/nginx.conf
|
||||||
if [ -f /var/run/nginx.pid ]; then
|
if [ -f /var/run/nginx.pid ]; then
|
||||||
/etc/init.d/nginx restart
|
/etc/init.d/nginx restart
|
||||||
@@ -11,3 +12,4 @@ if [ -f "/etc/nginx/nginx.conf" ] && [ -f "/etc/nginx/ariang.conf" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user