nopaque/web/boot.sh
2020-11-17 14:58:03 +01:00

30 lines
598 B
Bash
Executable File

#!/bin/bash
if [[ "${NOPAQUE_DAEMON_ENABLED}" == "True" ]]; then
echo "INFO Starting nopaque daemon process..."
./nopaque-daemon.sh &
fi
source venv/bin/activate
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