2020-10-08 12:34:02 +02:00
|
|
|
#!/bin/bash
|
2020-11-19 12:29:40 +01:00
|
|
|
source venv/bin/activate
|
2020-11-13 15:01:53 +01:00
|
|
|
if [[ "${#}" -eq 0 ]]; then
|
2022-04-22 16:36:12 +02:00
|
|
|
if [[ "${NOPAQUE_IS_PRIMARY_INSTANCE:-True}" == "True" ]]; then
|
|
|
|
while true; do
|
|
|
|
echo "INFO Run deployment tasks..."
|
|
|
|
flask deploy
|
|
|
|
if [[ "${?}" == "0" ]]; then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
echo "WARNING ...Failed, retrying in 5 secs..."
|
|
|
|
sleep 5
|
|
|
|
done
|
2021-09-22 13:53:39 +02:00
|
|
|
echo "INFO Start nopaque daemon..."
|
|
|
|
flask daemon run &
|
|
|
|
fi
|
2021-11-15 14:35:37 +01:00
|
|
|
echo "INFO Start nopaque..."
|
2022-04-22 16:36:12 +02:00
|
|
|
python nopaque.py
|
2020-11-13 15:01:53 +01:00
|
|
|
elif [[ "${1}" == "flask" ]]; then
|
2020-10-08 12:34:02 +02:00
|
|
|
exec ${@:1}
|
|
|
|
else
|
2020-11-13 15:01:53 +01:00
|
|
|
echo "${0} [COMMAND]"
|
2020-10-08 12:34:02 +02:00
|
|
|
echo ""
|
|
|
|
echo "nopaque startup script"
|
|
|
|
echo ""
|
2020-10-08 23:10:07 +02:00
|
|
|
echo "Commands:"
|
2020-10-08 12:34:02 +02:00
|
|
|
echo " flask"
|
|
|
|
fi
|