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
Post a Comment