forked from ddollar/foreman
-
Notifications
You must be signed in to change notification settings - Fork 1
Custom Signals
ddollar edited this page Jan 4, 2012
·
1 revision
Foreman uses SIGTERM
by default to alert processes that they need to shut down. If you need to use an alternate termination signal, you can use a wrapper script:
#!/bin/bash
# trap TERM and change to QUIT
trap 'echo killing $PID; kill -QUIT $PID' TERM
# program to run
bin/daemon &
# capture PID and wait
PID=$!
wait