From fa42ba06b966bb1d9ade39b3f74ac606ea349ba0 Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 17 Jul 2024 00:04:50 +0800 Subject: [PATCH] upgrade script improve --- bin/upgrade.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/upgrade.sh b/bin/upgrade.sh index bc1ff72..f48457a 100755 --- a/bin/upgrade.sh +++ b/bin/upgrade.sh @@ -87,7 +87,14 @@ echo "" # upgrade nginx config -cp /var/www/machete/conf/nginx_machete.conf /etc/nginx/http.d/machete.conf +if [ -d /etc/nginx/http.d/ ]; then + cp /var/www/machete/conf/nginx_machete.conf /etc/nginx/http.d/machete.conf +fi + +if [ -d /etc/nginx/conf.d/ ]; then + cp /var/www/machete/conf/nginx_machete.conf /etc/nginx/conf.d/machete.conf +fi + /usr/sbin/nginx -s reload echo "Nginx config upgraded and reloaded." echo ""