Sha256: 99c04b667442ed4edf4365d0394faa73f447b011c395bfff5dd614b43f4ea374

Contents?: true

Size: 1.42 KB

Versions: 2

Compression:

Stored size: 1.42 KB

Contents

#!/usr/bin/ruby

#    This file is part of EC2 on Rails.
#    http://rubyforge.org/projects/ec2onrails/
#
#    Copyright 2007 Paul Dowman, http://pauldowman.com/
#
#    EC2 on Rails is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    EC2 on Rails is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

require "#{File.dirname(__FILE__)}/../lib/roles_helper"
require "#{File.dirname(__FILE__)}/../lib/utils"

include Ec2onrails::RolesHelper


APP_ROOT = "/mnt/app/current"
RAILS_ENV = Ec2onrails::Utils.rails_env

#reload configs to pick up any new changes
# Just a thought... do we really need to load god files from inside the app? They could just be installed via install_system_files, that would be simpler
Dir.glob("/etc/god/*.god") + Dir.glob("/mnt/app/current/config/god/#{RAILS_ENV}/*.god").each do |f|
  sudo "god load '#{f}'"
end


roles.keys.each do |role|
  if in_role? role
    start role
  else
    stop role
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pauldowman-ec2onrails-0.9.10.0 server/files/usr/local/ec2onrails/bin/init_services
pauldowman-ec2onrails-0.9.10.1 server/files/usr/local/ec2onrails/bin/init_services