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