Carica file su ''
Initial commit
This commit is contained in:
parent
481a07670d
commit
899cbcef31
1 changed files with 23 additions and 0 deletions
23
tails_torrent.sh
Normal file
23
tails_torrent.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
parent_path=$(dirname $(realpath $0))
|
||||
cd "$parent_path"
|
||||
|
||||
|
||||
new=$(lynx --dump --nonumbers https://tails.boum.org/torrents/files/ | grep "\.torrent")
|
||||
lastname=$(basename "$0" | cut -d. -f1).last
|
||||
|
||||
old=$(cat $lastname)
|
||||
#echo "$new"
|
||||
#echo "$old"
|
||||
|
||||
|
||||
if [ "$old" != "$new" ]; then
|
||||
while IFS= read -r line; do
|
||||
echo $line
|
||||
transmission-remote --auth transmission:transmission --add $line --no-downlimit --no-uplimit --no-seedratio --download-dir /mnt/torrent/downloads/tails
|
||||
done <<< $(echo "$new" | grep "^http")
|
||||
|
||||
echo "$new" > $lastname
|
||||
fi
|
||||
|
Loading…
Reference in a new issue