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
|
#!/bin/bash
|
||||||
|
|
||||||
# Test Nginx configuration
|
# Test Nginx configuration
|
||||||
if sudo /usr/local/nginx/sbin/nginx -t; then
|
sudo nginx -t
|
||||||
echo "✅ Nginx config test passed, reloading..."
|
if [ $? -eq 0 ]; then
|
||||||
if sudo /usr/local/nginx/sbin/nginx -s reload; then
|
echo "✅ Nginx config test passed, reloading..."
|
||||||
echo "🚀 Nginx reloaded successfully!"
|
sudo systemctl reload nginx
|
||||||
else
|
if [ $? -eq 0 ]; then
|
||||||
echo "❌ Nginx reload failed!"
|
echo "🚀 Nginx reloaded successfully!"
|
||||||
fi
|
else
|
||||||
|
echo "❌ Nginx reload failed!"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "❌ Nginx config test failed!"
|
echo "❌ Nginx config test failed!"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user