4 # Start the first process
5 nohup python /fenix/fenix/cmd/engine.py > /var/log/fenix-engine.log&
7 if [ $status -ne 0 ]; then
8 echo "Failed to start engine.py: $status"
12 # Start the second process
13 nohup python /fenix/fenix/cmd/api.py > /var/log/fenix-api.log&
15 if [ $status -ne 0 ]; then
16 echo "Failed to start api.py: $status"
20 echo "started Fenix: engine and api"
22 ps aux |grep "cmd/engine.py" |grep -q -v grep
24 ps aux |grep "cmd/api.py" |grep -q -v grep
26 # If the greps above find anything, they exit with 0 status
27 # If they are not both 0, then something is wrong
28 if [ $PROCESS_1_STATUS -ne 0 -o $PROCESS_2_STATUS -ne 0 ]; then
29 echo "One of the processes has already exited."