Ниже приведен сценарий выскочки для sidekiq. Запуск upstart
sudo service sidekiq start
Получает следующую ошибку
sidekiq: unrecognized service
Ниже приведен контент sidekiq.conf
# Just a custom description for our Job
description "Sidekiq Background Worker"
# On which conditions the job should start. In this case it's very simple: On the system startup (this is basically when the system is booted)
#start on startup
start on runlevel [2345]
# On which conditions the job should stop. In this case when the system reboot (http://upstart.ubuntu.com/cookbook/#runlevels)
stop on runlevel [06]
# This are the User and User Group that will be used to run the Job. On our case it should be the user that we have set on our capistrano script for instance.
# You can check at `config/deploy/<environment>.rb` on this line `server <some_ip_addreess>, user: <deploy_user>`
setuid ubuntu
setgid ubuntu
# This indicate that we want to restart the Job if it crashes
respawn
respawn limit 3 30
# TERM is sent by sidekiqctl when stopping sidekiq. Without declaring these as normal exit codes, it just respawns.
normal exit 0 TERM
script
# this script runs in /bin/sh by default
# respawn as bash so we can source in RVM
exec /bin/bash <<EOT
# use syslog for logging
exec &> /dev/kmsg
# Jump into the capistrano deployment directory
cd /home/ubuntu/myproject/
# Start Sidekiq through RVM. Note that I'm using the standard Capistrano paths
exec ~/.rvm/bin/rvm-shell -c 'bundle exec sidekiq -C ./config/sidekiq.yml --environment production --logfile /home/ubuntu/myproject/log/sidekiq.log'
EOT
end script
В syslog никаких журналов не отображается ].