Guest User

Untitled

a guest
May 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. ## ./config/deploy/testing.rb
  2. namespace(:deploy) do
  3. desc "Enable mongrel config (custom)"
  4. task :mongrel_enable, :roles => :app do
  5. begin
  6. puts "Checking for existing symlink..."
  7. run "test -f /etc/mongrel_cluster/test.mongrel_cluster.yml"
  8. rescue
  9. puts "Creating symlink..."
  10. run "test -f #{current_path}/config/test.mongrel_cluster.yml"
  11. sudo "ln -s #{current_path}/config/test.mongrel_cluster.yml /etc/mongrel_cluster/"
  12. ensure
  13. puts "Verifying symlink exists..."
  14. run "test -f /etc/mongrel_cluster/test.mongrel_cluster.yml"
  15. end
  16. end
  17. end
Add Comment
Please, Sign In to add comment