nginx is not custom build, hence using the normal bash command to restart nginx server
This commit is contained in:
parent
f03bc9be65
commit
b7d38474ed
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user