mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-14 16:55:42 +00:00
29 lines
720 B
Bash
Executable File
29 lines
720 B
Bash
Executable File
#!/bin/bash
|
|
source venv/bin/activate
|
|
if [[ "${#}" -eq 0 ]]; then
|
|
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
|
|
echo "INFO Start nopaque daemon..."
|
|
flask daemon run &
|
|
fi
|
|
echo "INFO Start nopaque..."
|
|
python nopaque.py
|
|
elif [[ "${1}" == "flask" ]]; then
|
|
exec ${@:1}
|
|
else
|
|
echo "${0} [COMMAND]"
|
|
echo ""
|
|
echo "nopaque startup script"
|
|
echo ""
|
|
echo "Commands:"
|
|
echo " flask"
|
|
fi
|