Created
August 7, 2015 13:01
-
-
Save bixu/5fa1b59f480f205ba07c to your computer and use it in GitHub Desktop.
Store your torrent downloads (for example, the latest Slackware Linux ISO) directly in Manta from within an `mjob` or `mlogin` session.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# "An elegant weapon, from a more civilized age." | |
MAGNET_URL=$1 | |
transmission-daemon | |
sleep 3 | |
transmission-remote localhost --encryption-required --uplimit 1 --add $MAGNET_URL | |
while [ $(transmission-remote localhost --list | grep -v "^ID\|Sum" | grep -c "100%\|Seeding") -ne 1 ] | |
do | |
transmission-remote localhost --list | |
if [ $(transmission-remote localhost --list | grep -v "^ID\|Sum" | grep -c "100%\|Seeding") -ge 1 ]; then | |
pkill transmission | |
npm install manta-sync | |
./node_modules/.bin/manta-sync /root/Downloads/ ~~/stor/Downloads/ | |
exit | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment