nopaque/web/boot.sh
2020-10-28 09:16:58 +01:00

24 lines
479 B
Bash
Executable File

#!/bin/bash
source venv/bin/activate
export FLASK_APP=nopaque.py
if [[ "$#" -eq 0 ]]; then
while true; do
flask deploy
if [[ "$?" == "0" ]]; then
break
fi
echo Deploy command failed, retrying in 5 secs...
sleep 5
done
python nopaque.py
elif [[ "$1" == "flask" ]]; then
exec ${@:1}
else
echo "$0 [COMMAND]"
echo ""
echo "nopaque startup script"
echo ""
echo "Commands:"
echo " flask"
fi