Created
July 19, 2013 09:41
-
-
Save mosson/6037977 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
find_and_execute_task("private_pub:stop") | |
find_and_execute_task("private_pub:start") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment