Skip to content

Instantly share code, notes, and snippets.

@jefflab
Created December 15, 2011 18:23
Show Gist options
  • Select an option

  • Save jefflab/1482196 to your computer and use it in GitHub Desktop.

Select an option

Save jefflab/1482196 to your computer and use it in GitHub Desktop.
NFS propagation debug capistrano task
task :check_current_symlink, :roles => :app do
run %Q[TARGET=`ls -l #{current_path} | sed 's/.*->\ //g'`; RELEASE_PATH='#{release_path}'; if [ $TARGET == $RELEASE_PATH ]; then echo "CURRENT"; else echo "OLD"; fi; echo "TARGET=$TARGET"; echo "RELEASE_PATH=$RELEASE_PATH"]
end
before "deploy:restart", "check_current_symlink"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment