Skip to content
This repository was archived by the owner on Feb 18, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/murder/admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down
6 changes: 3 additions & 3 deletions lib/murder/murder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
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
If the seeder is currently seeding, this will kill the process. Note that if it is not running, you will receive an error. If a peer was downloading from this seed, the peer will find another host to receive any remaining data. You must specify a valid 'tag' argument.
DESC
task :stop_seeding, :roles => :seeder do
require_tag
run("pkill -f \"SCREEN.*seeder-#{tag}\"")
run("pkill -f \"python.*seeder-#{tag}\"")
end

desc <<-DESC
Expand All @@ -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)
Expand Down