Created an run.sh file
This commit is contained in:
parent
98c487f4cb
commit
c21ccdd85f
18
run.sh
Normal file
18
run.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
while true; do
|
||||
# Check if the python app is running on port 5000
|
||||
if ! lsof -i :5000 > /dev/null; then
|
||||
|
||||
echo "Python app is not running on port 5000. Starting it"
|
||||
cd /app/data/public/CommunityRuleChatBot/CommunityRuleChatBot
|
||||
source myvenv/bin/activate
|
||||
python3 run.py &
|
||||
else
|
||||
echo "Python app is already running on port 5000. Nothing to do"
|
||||
fi
|
||||
|
||||
# Sleep for 30 minutes (1800 seconds)
|
||||
|
||||
sleep 1800
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user