sudo apt-get install runit
cd /etc/sv/ mkdir sidekiq cd sidekiq
nano run
#!/bin/sh
cd /home/deployer/application/current/
exec 2>&1
exec chpst -udeployer bundle exec sidekiq -e production -P /home/deployer/application/current/tmp/pids/sidekiq.pid -L /home/qeployer/application/current/log/sidekiq.log
/etc/sv/sidekiq# chmod 755 run
ln -s /etc/sv/sidekiq /etc/service/sidekiq sudo reboot
cd /etc/sv/sidekiq/
chmod 755 supervise/
chown deployer ./supervise/ok ./supervise/control ./supervise/status
Check status:
sv status sidekiq
sv check sidekiq
Runit Log can be checked at:
/var/log/upstart/runsvdir.log
More details at http://smarden.org/runit/faq.html#user