#!/bin/bash # Test Nginx configuration 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!" fi