123456789101112131415161718 |
- #!/bin/bash
- while true; do
-
- 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 1800
- done
|