# For TextMate users, change the language type (at bottom of window, next to line/column counter, to ruby) # applog(nil, :info, "loading /etc/god/master.conf") require '/usr/local/ec2onrails/lib/god_helper' require '/usr/local/ec2onrails/lib/roles_helper' require '/usr/local/ec2onrails/lib/utils' require "fileutils" include GodHelper include Ec2onrails::RolesHelper APP_ROOT = "/mnt/app/current" @configs = GodHelper::Configs.new God.pid_file_directory = "/var/run/god" God.load "/etc/god/*.god" applog(nil, :info, "about to load application specific configs at #{APP_ROOT}/config/god/*.god") God.load "#{APP_ROOT}/config/god/*.god" # at the end, we want to init the correct services # need to put it into a thread because god is not finished # initalizing at this point, so we need to let it finish # so we can call init_services, which calls god directly # # using a fork copies over the processing space, causing # god to reload again..and again...and again... Thread.new do sleep(2) applog(nil, :info, "initializing services....") system("/usr/local/ec2onrails/bin/init_services") end