16 lines
363 B
Bash
Executable File
16 lines
363 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ssh -i /home/arul/.ssh/id_rsa root@74.208.74.61 <<EOF
|
|
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
|
|
else
|
|
echo "❌ Nginx config test failed!"
|
|
fi
|
|
EOF
|
|
|