16 lines
342 B
Bash
Executable File
16 lines
342 B
Bash
Executable File
#!/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
|