mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 10:41:32 +00:00
ensure stop is always called at the end of entry script
interrupts were not properly handled by the entry script, and could leave containers active. This is fixed by running stop in a cleanup function, called on exit.
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
|
||||
LOCATION="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
function cleanup {
|
||||
${LOCATION}/stop
|
||||
echo "done."
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
# start all instances
|
||||
${LOCATION}/start
|
||||
|
||||
@@ -15,6 +22,3 @@ for f in $(find ${LOCATION} -mindepth 2 -maxdepth 3 -name docker-compose.yml); d
|
||||
done
|
||||
echo "waiting on processes: ${pids[@]}"
|
||||
wait -n ${pids[@]} > /dev/null
|
||||
|
||||
# cleanup
|
||||
${LOCATION}/stop
|
||||
|
||||
Reference in New Issue
Block a user