The people behind sidekiq thankfully provide a nice init script, although my particular setup caused a few problems for it.
- The script should run as root, however I use a 'deployer' user, under which runs rbenv. Root had no access to
- Since I don't write init scripts often, it took me a while to get it to start after Redis
My workaround to the rbenv problem was to modify the providied Sidekiq init script, to run the actual
bundle exec sidekiq command as my deployment user: