Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.

Latest commit

 

History

History
16 lines (13 loc) · 1.18 KB

daemon_with_upstart_and_rvm.md

File metadata and controls

16 lines (13 loc) · 1.18 KB

Setting up gorgon listener using upstart

These steps will guarantee that the listener is always running and it will start when the OS boots. They have been tested using Ubuntu 12.04, but these steps should work with any OS that uses upstart. We are assuming you are using rvm

  1. mkdir ~/.gorgon && cd ~/.gorgon
  2. rvm use ruby-1.9.3 or whatever version of ruby you use.
  3. gem install gorgon foreman
  4. Place your gorgon_listener.json in this directory. See here for a gorgon_listener.json example.
  5. echo 'listener: [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" && rvm ruby-1.9.3 do gorgon listen > listener.out 2> listener.err' > Procfile
  6. rvmsudo foreman export upstart /etc/init -a gorgon -u `whoami` -c listener=1
  7. sudo start gorgon
  8. open ’/etc/init/gorgon.conf’ and add start on runlevel [2345] at the top of the file
  9. Check if listener is running: Run tail /tmp/gorgon-remote.log and the last line should say “Waiting for jobs…”

If you modify ~/.gorgon/gorgon_listener.json, make sure you restart the listener by running sudo restart gorgon