Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
update sig handling in start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
robby-d committed Jun 26, 2016
1 parent d0459af commit 4546bc2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ export COUNTERBLOCK_PORT_TESTNET_CHAT=${COUNTERBLOCK_PORT_TESTNET_CHAT:=14102}
VARS='$REDIS_HOST:$REDIS_PORT:$REDIS_DB:$COUNTERBLOCK_HOST_MAINNET:$COUNTERBLOCK_HOST_TESTNET:$COUNTERBLOCK_PORT_MAINNET:$COUNTERBLOCK_PORT_TESTNET:$COUNTERBLOCK_PORT_MAINNET_FEED:$COUNTERBLOCK_PORT_TESTNET_FEED:$COUNTERBLOCK_PORT_MAINNET_CHAT:$COUNTERBLOCK_PORT_TESTNET_CHAT'
envsubst "$VARS" < /counterwallet/docker/nginx/counterwallet.conf.template > /etc/nginx/sites-enabled/counterwallet.conf

nginx -g 'daemon off;'
# Launch utilizing the SIGTERM/SIGINT propagation pattern from
# http://veithen.github.io/2014/11/16/sigterm-propagation.html
trap 'kill -TERM $PID' TERM INT
nginx -g 'daemon off;' &
# ^ maybe simplify to just be "nginx" in the future
PID=$!
wait $PID
trap - TERM INT
wait $PID
EXIT_STATUS=$?

0 comments on commit 4546bc2

Please sign in to comment.