Update script to use global header and no trap

The server script should just give a clean, foreground execution of the
app.
A second script has been added to a dev server launch to try to get a
backgrounding wrapper in place.
This commit is contained in:
Devon Mackay 2018-07-10 09:46:44 -04:00
parent 10fa0a7ffa
commit 2b95291f93

View File

@ -1,26 +1,8 @@
#!/bin/bash #!/bin/bash
reap() { # script/server: Launch the server
kill -TERM $child
sleep 0.1
exit
}
trap reap TERM INT source "$(dirname "${0}")"/../script/include/global_header.inc.sh
# If a command fails, exit the script
set -e
# Ensure we are in the app root directory (not the /script directory)
cd "$(dirname "${0}")/.."
if [ -z "${SKIP_PIPENV+xxxx}" ]; then
CMD_PREFIX='pipenv run '
fi
PYTHON_CMD="${CMD_PREFIX}python"
# Launch the app # Launch the app
${PYTHON_CMD} app.py ${@} & run_command "./app.py ${LAUNCH_ARGS}"
child=$!
wait $child