ruby - How to terminate transmission-cli -


i using ruby script download bitcoin bootstrap.dat file, file can downloaded using torrent client download on command line using following ruby demo script:

#!/usr/bin/ruby env `transmission-cli https://bitcoin.org/bin/blockchain/bootstrap.dat.torrent` 

now run script

root@master:~# ruby demo 

but script hangs because above transmission downloads torrents file after start seeding , uploading , never terminate automatically, there way can terminate using script?

is there way can send kill or termination signal after torrent download finished?

you can use -f, -finish <script> executes script when download completed:

tmpfile=$(mktemp) chmod a+x $tmpfile echo "killall transmission-cli" > $tmpfile transmission-cli -f $tmpfile your.torrent 

you use rtorrent has more options.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -