nginx is not custom build, hence using the normal bash command to restart nginx server

This commit is contained in:
arul 2025-11-16 09:13:41 +05:30
parent f03bc9be65
commit b7d38474ed

View File

@ -1,9 +1,11 @@
#!/bin/bash
# Test Nginx configuration
if sudo /usr/local/nginx/sbin/nginx -t; then
sudo nginx -t
if [ $? -eq 0 ]; then
echo "✅ Nginx config test passed, reloading..."
if sudo /usr/local/nginx/sbin/nginx -s reload; then
sudo systemctl reload nginx
if [ $? -eq 0 ]; then
echo "🚀 Nginx reloaded successfully!"
else
echo "❌ Nginx reload failed!"