Spaces:
Runtime error
Runtime error
File size: 426 Bytes
b0701b4 13f64bb b0701b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#!/bin/bash
# Start Nginx and output to /dev/null
service nginx start &> /dev/null
# Check if Nginx started successfully
if [ $? -ne 0 ]; then
echo "Nginx failed to start"
echo "Nginx error log:"
chown www-data:www-data /var/log/nginx/error.log
chmod 644 /var/log/nginx/error.log
cat /var/log/nginx/error.log
exit 1
fi
# If Nginx started successfully, then start the Flask application
python app.py
|