File size: 334 Bytes
b0701b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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:"
    cat /var/log/nginx/error.log
    exit 1
fi

# If Nginx started successfully, then start the Flask application
python app.py