From b7d38474edc40c4e511ef26360593f23a3c6849e Mon Sep 17 00:00:00 2001 From: arul Date: Sun, 16 Nov 2025 09:13:41 +0530 Subject: [PATCH] nginx is not custom build, hence using the normal bash command to restart nginx server --- .../tunnel-reverseproxy-restart | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sync-content-pro-site/tunnel-reverseproxy-restart b/sync-content-pro-site/tunnel-reverseproxy-restart index cc0a4b2..88b0596 100755 --- a/sync-content-pro-site/tunnel-reverseproxy-restart +++ b/sync-content-pro-site/tunnel-reverseproxy-restart @@ -1,13 +1,15 @@ #!/bin/bash # Test Nginx configuration -if sudo /usr/local/nginx/sbin/nginx -t; then - echo "✅ Nginx config test passed, reloading..." - if sudo /usr/local/nginx/sbin/nginx -s reload; then - echo "🚀 Nginx reloaded successfully!" - else - echo "❌ Nginx reload failed!" - fi +sudo nginx -t +if [ $? -eq 0 ]; then + echo "✅ Nginx config test passed, reloading..." + sudo systemctl reload nginx + if [ $? -eq 0 ]; then + echo "🚀 Nginx reloaded successfully!" + else + echo "❌ Nginx reload failed!" + fi else - echo "❌ Nginx config test failed!" + echo "❌ Nginx config test failed!" fi