nginx is not custom build, hence using the normal bash command to restart nginx server

This commit is contained in:
arul 2025-11-16 09:13:41 +05:30
parent f03bc9be65
commit b7d38474ed

View File

@ -1,9 +1,11 @@
#!/bin/bash #!/bin/bash
# Test Nginx configuration # Test Nginx configuration
if sudo /usr/local/nginx/sbin/nginx -t; then sudo nginx -t
if [ $? -eq 0 ]; then
echo "✅ Nginx config test passed, reloading..." echo "✅ Nginx config test passed, reloading..."
if sudo /usr/local/nginx/sbin/nginx -s reload; then sudo systemctl reload nginx
if [ $? -eq 0 ]; then
echo "🚀 Nginx reloaded successfully!" echo "🚀 Nginx reloaded successfully!"
else else
echo "❌ Nginx reload failed!" echo "❌ Nginx reload failed!"