2020-10-08 10:34:02 +00:00
|
|
|
#!/bin/bash
|
2020-11-13 09:01:51 +00:00
|
|
|
|
2020-11-13 14:01:53 +00:00
|
|
|
if [[ "${NOPAQUE_DAEMON_ENABLED}" == "True" ]]; then
|
|
|
|
echo "Starting nopaque daemon..."
|
|
|
|
./nopaque-daemon.sh &
|
|
|
|
fi
|
|
|
|
|
|
|
|
source venv/bin/activate
|
2020-11-09 15:14:19 +00:00
|
|
|
|
2020-11-13 14:01:53 +00:00
|
|
|
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
|
2020-10-08 10:34:02 +00:00
|
|
|
python nopaque.py
|
2020-11-13 14:01:53 +00:00
|
|
|
elif [[ "${1}" == "flask" ]]; then
|
2020-10-08 10:34:02 +00:00
|
|
|
exec ${@:1}
|
|
|
|
else
|
2020-11-13 14:01:53 +00:00
|
|
|
echo "${0} [COMMAND]"
|
2020-10-08 10:34:02 +00:00
|
|
|
echo ""
|
|
|
|
echo "nopaque startup script"
|
|
|
|
echo ""
|
2020-10-08 21:10:07 +00:00
|
|
|
echo "Commands:"
|
2020-10-08 10:34:02 +00:00
|
|
|
echo " flask"
|
|
|
|
fi
|