lib/cap_recipes/tasks/juggernaut/manage.rb in nesquena-cap-recipes-0.3.7 vs lib/cap_recipes/tasks/juggernaut/manage.rb in nesquena-cap-recipes-0.3.8
- old
+ new
@@ -1,25 +1,26 @@
Capistrano::Configuration.instance(true).load do
set :juggernaut_config, "#{current_path}/config/juggernaut.yml"
set :juggernaut_pid, "#{current_path}/tmp/pids/juggernaut.pid"
set :juggernaut_log, "#{current_path}/log/juggernaut.log"
+ set :base_ruby_path, '/usr'
namespace :juggernaut do
# ===============================================================
# PROCESS MANAGEMENT
# ===============================================================
desc "Starts the juggernaut push server"
task :start, :roles => :app do
puts "Starting juggernaut push server"
- try_sudo "juggernaut -c #{juggernaut_config} -d --pid #{juggernaut_pid} --log #{juggernaut_log}"
+ try_sudo "#{base_ruby_path}/bin/juggernaut -c #{juggernaut_config} -d --pid #{juggernaut_pid} --log #{juggernaut_log}"
end
desc "Stops the juggernaut push server"
task :stop, :roles => :app do
puts "Stopping juggernaut push server"
- try_sudo "juggernaut -c #{juggernaut_config} -k * --pid #{juggernaut_pid} --log #{juggernaut_log}"
+ try_sudo "#{base_ruby_path}/bin/juggernaut -c #{juggernaut_config} -k * --pid #{juggernaut_pid} --log #{juggernaut_log}"
end
desc "Restarts the juggernaut push server"
task :restart, :roles => :app do
juggernaut.stop
\ No newline at end of file