private_pub icon indicating copy to clipboard operation
private_pub copied to clipboard

cap recipe

Open alec-c4 opened this issue 13 years ago • 1 comments

Hi, do you planning to add capistrano recipes like this (https://github.com/collectiveidea/delayed_job/blob/master/lib/delayed/recipes.rb) to add ability to control faye from capistrano?

alec-c4 avatar Jul 21 '12 20:07 alec-c4

I has one:

namespace :private_pub do
  desc "Start private_pub server"
  task :start do
    run "cd #{current_path};RAILS_ENV=production bundle exec rackup private_pub.ru -s thin -E production -D -P tmp/pids/private_pub.pid"
  end

  desc "Stop private_pub server"
  task :stop do
    run "cd #{current_path};if [ -f tmp/pids/private_pub.pid ] && [ -e /proc/$(cat tmp/pids/private_pub.pid) ]; then kill -9 `cat tmp/pids/private_pub.pid`; fi"
  end

  desc "Restart private_pub server"
  task :restart do
    stop
    start
  end
end

It is not ideal, but works for me.

drakmail avatar Jun 24 '13 19:06 drakmail