Skip to content

Instantly share code, notes, and snippets.

@abstractj
Created July 20, 2011 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abstractj/1094352 to your computer and use it in GitHub Desktop.
Save abstractj/1094352 to your computer and use it in GitHub Desktop.
running_modes
def run_server
Dir.chdir(jboss_home) do
# don't send the gemfile from the current app, instead let
# bundler suss it out itself for each deployed
# app. Otherwise, they'll end up sharing this Gemfile, which
# is probably not what we want.
ENV.delete('BUNDLE_GEMFILE')
if windows?
exec *run_command_line
else
old_trap = trap("INT") do
puts "caught SIGINT, shutting down"
end
exec_command(run_command_line.join(' '))
trap("INT", old_trap)
end
end
end
def run_server_clustered
config_path = "#{File.join(DeployUtils.server_dir, '/configuration/standalone-ha.xml')}"
args = "--server-config=#{config_path}"
exec_command(run_command_line.join(" #{args}"))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment