Sha256: 42c1573d18eaedb80705ba86ce5ede6ca8852a2f1fbfad6c8e092bb0366efbb9

Contents?: true

Size: 888 Bytes

Versions: 1

Compression:

Stored size: 888 Bytes

Contents

Capistrano::Configuration.instance(:must_exist).load do

  namespace :ferret do
    desc "After update_code you want to symlink the index and ferret_server.yml file into place"
    task :symlink_configs, :roles => [:app, :ferret], :except => {:no_release => true, :ferret => false} do
      run <<-CMD
        cd #{latest_release} &&
        ln -nfs #{shared_path}/config/ferret_server.yml #{latest_release}/config/ferret_server.yml &&
        if [ -d #{latest_release}/index ]; then mv #{latest_release}/index #{latest_release}/index.bak; fi &&
        ln -nfs #{shared_path}/index #{latest_release}/index
      CMD
    end
    [:start,:stop,:restart].each do |op|
      desc "#{op} ferret server"
      task op, :roles => [:app, :ferret], :except => {:no_release => true, :ferret => false} do
        sudo "/usr/bin/monit #{op} all -g ferret_#{application}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
engineyard-eycap-0.3.8 lib/eycap/recipes/ferret.rb