ESN-Trondheim / ESNbot

A Slack bot for ESN Trondheim
MIT License
3 stars 2 forks source link

Update restart.sh #44

Closed LaiAlexander closed 1 year ago

LaiAlexander commented 1 year ago

@hansmariusoveras Here's a suggestion for an update to the script that includes updating of packages and activates virtual environment before the scripts starts. I couldn't get the line screen -dmS esnbot python3 esnbot/main.py to work properly in a test env, so I changed the structure a little bit (which may have been necessary to activate venv first anyway). As I mentioned my linux-fu is a little bit weak, so feel free to edit the script if necessary. I'll let the merging be up to you.

Also we may want to consider having a way to shut the bot down nicely. Just killing the screen session could lead to issues if it happens to occur when the bot is writing to file etc.