nopaque/boot.sh

36 lines
894 B
Bash
Raw Normal View History

#!/bin/bash
display_help() {
local script_name=$(basename "${0}")
echo ""
echo "Usage: ${script_name} [COMMAND]"
echo ""
echo "Run wrapper for a nopaque instance"
echo ""
echo "Commands:"
echo " flask A general utility script for Flask applications."
echo ""
echo "Run '${script_name} COMMAND --help' for more information on a command."
}
2023-09-25 08:11:11 +00:00
if [[ "${#}" == "0" ]]; then
if [[ "${NOPAQUE_IS_PRIMARY_INSTANCE:-True}" == "True" ]]; then
while true; do
flask deploy
if [[ "${?}" == "0" ]]; then
break
fi
echo "Deploy command failed, retrying in 5 secs..."
sleep 5
done
fi
2022-11-11 13:59:14 +00:00
python3 nopaque.py
2020-11-13 14:01:53 +00:00
elif [[ "${1}" == "flask" ]]; then
2023-09-25 08:11:11 +00:00
flask ${@:2}
elif [[ "${1}" == "--help" || "${1}" == "-h" ]]; then
display_help
else
display_help
exit 1
fi