views:

34

answers:

1

I have one folder in the public_html folder named techease and I want my application symlink with this existing folder how can I do this ?

because when I link this with this folder then it will create public folder in the techease folder and then symlink with that folder.

It how can I create symlink with the existing folder not new created folder If I delete techease folder and create symlink then it will working fine but when that folder already exists then it will not working.

Please help me out on this problem.

Thank you

+2  A: 

The place to do this is from your Capistrano recipe. You can create a new task that automatically creates the symbolic link after the deployment. It will look something like this (you'll have to update the paths for your situation):

after :deploy, 'deploy:link_dependencies'

namespace :deploy do
  desc <<-DESC
    Creates symbolic links to configuration files and other dependencies after deployment.
  DESC
  task :link_dependencies, :roles => :app do
    run "ln -nfs #{shared_path}/public/techease #{release_path}/public/techease"
  end
end
John Topley