Reputation: 4349
I have written an upstart task that I am trying to start on my CentOS 6 and Ubuntu boxes. I placed my upstart task in /etc/init/sidekiq.conf
But when I run...
start sidekiq
or
service start sidekiq
As root, I get...
start: Unknown job: sidekiq
My upstart file is as below...
# /etc/init/sidekiq.conf - Sidekiq config for Ubuntu's Upstart
description "Sidekiq Background Workers"
start on runlevel [2345]
stop on runlevel [06]
env RAILS_ENV = 'qa'
env app = 'myapp'
setuid deploy
setgid deploy
respawn
respawn limit 3 30
#exec bundle exec sidekiq -e qa03
cd /srv/www/${app}
exec start-stop-daemon --start bundle exec sidekiq -q mailer -q default -L log/sidekiq.log -e ${RAILS_ENV}
Why is it not starting? I thought running start sidekiq should run the task?
Upvotes: 0
Views: 1415
Reputation: 616
cd
is not an Upstart stanza. Just add a script section with the cd command. Also, your env
stanzas should look like so: env app='myapp'
(note the deletion of whitespace around the "=").
You can also just delete the "start-stop-daemon --start" portion, you do not need it (although the stuff before and after it you do need).
Upvotes: 1