1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/examples/upstart.conf
2013-01-30 15:19:51 -08:00

39 lines
885 B
Text

# /etc/init/sidekiq.conf - Sidekiq config
# This example config should work with Ubuntu 12.04+
#
# Save this config as /etc/init/sidekiq.conf then mange sidekiq with:
# sudo start sidekiq
# sudo stop sidekiq
# sudo status sidekiq
#
# or use the service command:
# sudo service sidekiq {start,stop,restart,status}
#
# This is the exact script used to manage Sidekiq on TheClymb.com
#
description "Sidekiq Background Worker System"
start on runlevel [2345]
stop on shutdown
setuid deploy
setgid deploy
respawn
respawn limit 3 30
script
# this script runs in /bin/sh by default
# respawn as bash so we can source in rbenv
exec /bin/bash <<EOT
# use syslog for logging
exec >/dev/kmsg 2>&1
# pull in system rbenv
source /etc/profile.d/rbenv.sh
cd /opt/theclymb/current
exec bin/sidekiq -e production -C config/sidekiq.yml -P tmp/pids/sidekiq.pid
EOT
end script