Sebi-Machine/sebi_machine_launcher.sh
nya~ f6c4a5a570
Update (#1)
* Update sebi_machine_launcher.sh

* Update sebi_machine_launcher.sh

* Update requirements.txt

* removed numpy import

* Fixed a stupid typo.

* Fixed broken import someone didn't check.

* Updated bot_management.py

* Updated bot_management.py

* Update bot_management.py

* Update bot_management.py

* Update bot_management.py

* Added ban command

And changed the response because if you were talking without commas you would need to breathe heavily and and and and *huff*

* Update bot_management.py

* Aaa

wrong word lmao

* Update bot_management.py
2018-06-21 09:20:10 +01:00

18 lines
705 B
Bash

#!/bin/bash
# 20th June 2018
# Esp: added a trap here, as it otherwise attempts to restart when given
# the interrupt signal. This is really annoying over SSH when I have
# a 1-second lag anyway.
trap "echo 'Received interrupt. Exiting.'; exit 0" SIGINT
# Also loads the venv if it is present.
[ -d .venv/bin ] && source .venv/bin/activate && echo "Entered venv." || echo "No venv detected."
until python -m src; do
# Added colouring to ensure the date of shutdown and the exit code stands
# out from the other clutter in the traceback that might have been output.
echo -e "\e[0;31m[$(date --utc)]\e[0m Sebi-Machine shutdown with error \e[0;31m$?\e[0m. Restarting..." >&2
sleep 1
done