nopaque/boot.sh

30 lines
604 B
Bash
Raw Normal View History

#!/bin/bash
source venv/bin/activate
if [[ "${NOPAQUE_DAEMON_ENABLED:-True}" == "True" ]]; then
echo "INFO Starting nopaque daemon process..."
2020-11-13 14:01:53 +00:00
./nopaque-daemon.sh &
fi
if [[ "${#}" -eq 0 ]]; then
while true; do
flask deploy
if [[ "${?}" == "0" ]]; then
break
fi
echo "Deploy command failed, retrying in 5 secs..."
2020-11-13 14:01:53 +00:00
sleep 5
done
python nopaque.py
2020-11-13 14:01:53 +00:00
elif [[ "${1}" == "flask" ]]; then
exec ${@:1}
else
2020-11-13 14:01:53 +00:00
echo "${0} [COMMAND]"
echo ""
echo "nopaque startup script"
echo ""
2020-10-08 21:10:07 +00:00
echo "Commands:"
echo " flask"
fi