mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-21 13:39:22 +01:00
40616f0d7c
We were for instance calling trap at a point where it wouldn't get called, and giving special status to some processes to run in the foreground. Instead we: 1. wait for any process exit 2. use it's exit code for the calling process 3. kill background processes on EXIT
15 lines
249 B
Bash
Executable File
15 lines
249 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
./bin/migrate-check
|
|
|
|
# Stop any background jobs on exit
|
|
trap 'kill $(jobs -p)' EXIT
|
|
|
|
./bin/plugin-server &
|
|
./bin/docker-worker-celery --with-scheduler &
|
|
|
|
# Exit if any processes exit, and exit with it's exit code
|
|
wait -n
|
|
exit $?
|