public
Fork of ari/clockingit
Description: Project Management, Collaboration and Time Tracking. These is my modifications to the current master.
Homepage: http://www.clockingit.com/
Clone URL: git://github.com/markcatley/clockingit.git
README.rdoc

ClockingIT Configuration Files

Init.d Files

I saw someone request this on the forums so I have posted my solution.

This uses the god process monitoring daemon (god.rubyforge.org). It should take care of starting the daemons as well as restarting them if they start using far to many resources. The script only manages the push_server and ferret, so you must run the rails app itself using some other daemon (personally I use mod_rails). I have included the init configs for gentoo and debian-based (ubuntu, etc. should work but haven’t been tested) distributions. There is a god init config floating round the internet for redhat based distros, which should be easy to adapt.

Instructions

Install god.

  $ sudo gem install god

Copy the god-init.d file for your distro to /etc/init.d/god and the god-conf.d file to /etc/conf.d/god if there is one for your distro.

Copy god.conf to /etc/god.conf

Copy all the .god files to /etc/god/ (there is only one at the moment).

Edit the cit.god file and change the rails_root variable to the base of your ClockingIt application.

Make the init.d script executable.

  $ sudo chmod +x /etc/init.d/god

Now you should be able to treat it like a regular init.d script.

You can check things are running by doing:

  $ sudo god status

You should have two entries which both say "up".

Issues

I have changed the pid file location for ferret (you can do it too in the config/ferret.yml). It must be consistant with the line in cit.god which gods.

  w.pid_file = "#{rails_root}/tmp/pids/ferret.pid"

If you have not changed the default you should change that line to

  w.pid_file = "#{rails_root}/log/ferret.pid"