multimodalart HF Staff commited on
Commit
b0701b4
·
1 Parent(s): 6f699a8

Create start.sh

Browse files
Files changed (1) hide show
  1. start.sh +15 -0
start.sh ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Start Nginx and output to /dev/null
4
+ service nginx start &> /dev/null
5
+
6
+ # Check if Nginx started successfully
7
+ if [ $? -ne 0 ]; then
8
+ echo "Nginx failed to start"
9
+ echo "Nginx error log:"
10
+ cat /var/log/nginx/error.log
11
+ exit 1
12
+ fi
13
+
14
+ # If Nginx started successfully, then start the Flask application
15
+ python app.py