diff --git a/lib/murder/admin.rb b/lib/murder/admin.rb index c8d8931..42822c5 100644 --- a/lib/murder/admin.rb +++ b/lib/murder/admin.rb @@ -40,12 +40,12 @@ desc "If the Bittorrent tracker is running, this will kill the process. Note that if it is not running you will receive an error." task :stop_tracker, :roles => :tracker do - run("pkill -f 'SCREEN.*murder_tracker.py'") + run("pkill -f 'python.*murder_tracker.py'") end desc "Identical to stop_seeding, except this will kill all seeding processes. No 'tag' argument is needed." task :stop_all_seeding, :roles => :seeder do - run("pkill -f \"SCREEN.*seeder-\"") + run("pkill -f \"python.*seeder-\"") end desc 'Sometimes peers can go on forever (usually because of an error). This command will forcibly kill all "murder_client.py peer" commands that are running.' diff --git a/lib/murder/murder.rb b/lib/murder/murder.rb index a3360b2..7ca56ac 100644 --- a/lib/murder/murder.rb +++ b/lib/murder/murder.rb @@ -53,7 +53,7 @@ DESC task :start_seeding, :roles => :seeder do require_tag - run "SCREENRC=/dev/null SYSSCREENRC=/dev/null screen -dms 'seeder-#{tag}' python #{remote_murder_path}/murder_client.py seeder '#{filename}.torrent' '#{filename}' `LC_ALL=C host $HOSTNAME | awk '/has address/ {print $4}' | head -n 1`" + run "SCREENRC=/dev/null SYSSCREENRC=/dev/null screen -dms 'seeder-#{tag}' python #{remote_murder_path}/murder_client.py seeder '#{filename}.torrent' '#{filename}' `LC_ALL=C host $CAPISTRANO:HOST$ | awk '/has address/ {print $4}' | head -n 1`" end desc <<-DESC @@ -61,7 +61,7 @@ DESC task :stop_seeding, :roles => :seeder do require_tag - run("pkill -f \"SCREEN.*seeder-#{tag}\"") + run("pkill -f \"python.*seeder-#{tag}\"") end desc <<-DESC @@ -87,7 +87,7 @@ run "rm -rf '#{destination_path}/'*" end if !ENV['no_tag_directory'] && !ENV['path_is_file'] - run "find '#{destination_path}/'* >/dev/null 2>&1 && echo \"destination_path #{destination_path} on $HOSTNAME is not empty\" && exit 1 || exit 0" + run "find '#{destination_path}/'* >/dev/null 2>&1 && echo \"destination_path #{destination_path} on $CAPISTRANO:HOST$ is not empty\" && exit 1 || exit 0" end upload("#{filename}.torrent", "#{filename}.torrent", :via => :scp)