Skip to content

Commit

Permalink
Allow assigning termination signal via /etc/default or /etc/sysconfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Chekaluk committed Dec 27, 2013
1 parent 7932d45 commit 560be1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/chef/cookbooks/sidekiq/templates/default/sidekiq.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CURDIR=`pwd`
usage() {
echo "Usage: $0 <appname> {start|stop|quit} <environment> <conf_file>"
echo -e "\nstop) is a synonym for quit"
echo "quit) issues -INT to request the worker to stop"
echo "quit) issues -$SIG to request the worker to stop"
echo -e "\nSee http://mperham.github.com/sidekiq/ for more details"
exit 1
}
Expand Down Expand Up @@ -98,6 +98,7 @@ fi
APP=$1 ; ACTION=$2; RACK_ENV=$3; CONF_FILE=$4;
APP_HOME="/data"
SIDEKIQ="sidekiq"
SIG="INT"

WORKER_REF=`echo $CONF_FILE | sed s/.yml//`

Expand Down Expand Up @@ -169,7 +170,6 @@ if [ -d $APP_ROOT ]; then
stop|quit)
legacy_fix
lock
SIG="INT"
signal_worker
[ -e "$LOCK_FILE" ] && rm $LOCK_FILE
unlock_and_exit_cleanly
Expand Down

0 comments on commit 560be1f

Please sign in to comment.