Sha256: 2b363ba4b865679b546c0f43e2c7c1e840eedb336b8ad847c1f02589ae4ecdf7

Contents?: true

Size: 1.07 KB

Versions: 7

Compression:

Stored size: 1.07 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/>.


# This script updates the current RAILS_ENV setting for this instance

require "yaml"
require "erb"

if ARGV.length != 1
  puts "usage: set_rails_env <value>"
  exit 1
end

@rails_env = ARGV[0]

File.open("/etc/ec2onrails/rails_env", 'w') do |f|
  f << @rails_env
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
ewoutvonk-ec2onrails-0.9.10.4.001 server/files/usr/local/ec2onrails/bin/set_rails_env
gigpark-ec2onrails-0.9.10.3 server/files/usr/local/ec2onrails/bin/set_rails_env
pauldowman-ec2onrails-0.9.10.0 server/files/usr/local/ec2onrails/bin/set_rails_env
pauldowman-ec2onrails-0.9.10.1 server/files/usr/local/ec2onrails/bin/set_rails_env
pauldowman-ec2onrails-0.9.10.2 server/files/usr/local/ec2onrails/bin/set_rails_env
pauldowman-ec2onrails-0.9.10.3 server/files/usr/local/ec2onrails/bin/set_rails_env
pauldowman-ec2onrails-0.9.10.4 server/files/usr/local/ec2onrails/bin/set_rails_env