Sha256: 78de18664499269e0083f4f5227cd6a91952efe8cfeeea381300dd9d4abd2985

Contents?: true

Size: 969 Bytes

Versions: 24

Compression:

Stored size: 969 Bytes

Contents

require 'fileutils'
require File.expand_path(File.dirname(__FILE__) + '/../utilities')

Capistrano::Configuration.instance(true).load do
  # JETTY SERVERS
  _cset :jetty_home, "/usr/local/jetty-7.1.6"
  _cset :jetty_ctrl, "/etc/init.d/jetty"

  #
  # simple interactions with the jetty server
  #
  namespace :jetty do

    desc "install jetty"
    task :install do
      dir = File.dirname(jetty_home)
      basename = File.basename(jetty_file)
      basectl = File.basename(jetty_ctrl)
      puts "#{jetty_file} ,,,, #{dir}  /#{basename}"
      utilities.sudo_upload "#{jetty_file}", "#{dir}/#{basename}"
      sudo "tar -zvxf #{dir}/#{basename} -C #{dir}"
      sudo "chown #{user}:root #{jetty_home} -R"

      put utilities.render("jetty", binding), "jetty.tmp"
      sudo "cp jetty.tmp #{jetty_ctrl}"
      sudo "chmod a+x #{jetty_ctrl}"
      sudo "/sbin/chkconfig --add #{basectl}"
      run "rm jetty.tmp"
      sudo "rm #{dir}/#{basename}"
    end

  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
crazycode-cap-recipes-0.5.3 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.5.2 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.5.1 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.5.0 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.14 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.13 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.12 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.11 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.10 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.9 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.8 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.6 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.5 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.4 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.3 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.2 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.1 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.4.0 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.3.39.3 lib/cap_recipes/tasks/jetty/install.rb
crazycode-cap-recipes-0.3.39.2 lib/cap_recipes/tasks/jetty/install.rb