Sha256: 9fae1f7f59b80877f8c7a035411aec20d40f7a0f18a50a69f6aca1e10662c3b8

Contents?: true

Size: 938 Bytes

Versions: 8

Compression:

Stored size: 938 Bytes

Contents

# Require our base drupal library
require 'ash/drupal'

configuration = Capistrano::Configuration.respond_to?(:instance) ?
  Capistrano::Configuration.instance(:must_exist) :
  Capistrano.configuration(:must_exist)

configuration.load do
  # --------------------------------------------
  # Overloaded Methods
  # --------------------------------------------
  namespace :deploy do
    desc "Setup shared application directories and permissions after initial setup"
    task :setup_shared, :roles => :web do
      # remove Capistrano specific directories
      run "rm -Rf #{shared_path}/log"
      run "rm -Rf #{shared_path}/pids"
      run "rm -Rf #{shared_path}/system"

      # create shared directories
      multisites.each_pair do |folder, url|
        run "mkdir -p #{shared_path}/#{url}/files"
      end

      # set correct permissions for a shared hosting environment
      run "chmod -R 755 #{shared_path}/*"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
capistrano-ash-1.1.8 lib/ash/drupal_shared_hosting.rb
capistrano-ash-1.1.7 lib/ash/drupal_shared_hosting.rb
capistrano-ash-1.1.6 lib/ash/drupal_shared_hosting.rb
capistrano-ash-1.1.5 lib/ash/drupal_shared_hosting.rb
capistrano-ash-1.1.4 lib/ash/drupal_shared_hosting.rb
capistrano-ash-1.1.3 lib/ash/drupal_shared_hosting.rb
capistrano-ash-1.1.2 lib/ash/drupal_shared_hosting.rb
capistrano-ash-1.1.1 lib/ash/drupal_shared_hosting.rb