From 2b95291f936f5988c9cb4924b65044b0d1ad9248 Mon Sep 17 00:00:00 2001 From: Devon Mackay Date: Tue, 10 Jul 2018 09:46:44 -0400 Subject: [PATCH] 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. --- script/server | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/script/server b/script/server index fa78012d..47e7cbaa 100755 --- a/script/server +++ b/script/server @@ -1,26 +1,8 @@ #!/bin/bash -reap() { - kill -TERM $child - sleep 0.1 - exit -} +# script/server: Launch the server -trap reap TERM INT - -# 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" +source "$(dirname "${0}")"/../script/include/global_header.inc.sh # Launch the app -${PYTHON_CMD} app.py ${@} & -child=$! - -wait $child +run_command "./app.py ${LAUNCH_ARGS}"