Correctly terminate child processes in the pgbouncer wrapper script

pull/2/head
Doc Ritezel 7 years ago
parent 89bba0b6e9
commit 3c9a9767c7
  1. 10
      bin/start-pgbouncer-stunnel

@ -1,4 +1,12 @@
#!/usr/bin/env bash
# Placeholder for pgbouncer buildpack
$@
function clean_up() {
KILL $CHILD_PID
exit
}
trap clean_up SIGHUP SIGINT SIGTERM
$@ &
CHILD_PID=$!
wait $CHILD_PID

Loading…
Cancel
Save