mirror of
https://github.com/simon987/scripts.git
synced 2025-04-10 05:46:44 +00:00
deluge script, update update script
This commit is contained in:
parent
838381ea89
commit
f94be5b7e6
29
old/deluge_tweak.sh
Normal file
29
old/deluge_tweak.sh
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
torrentid=$1
|
||||||
|
torrentname=$2
|
||||||
|
torrentpath=$3
|
||||||
|
x=1
|
||||||
|
ddport=$(grep '"daemon_port": [0-9]*' ~/.config/deluge/core.conf | awk -F ': ' '{print $2}' | awk -F ',' '{print $1}')
|
||||||
|
|
||||||
|
while [ $x -le 100 ]
|
||||||
|
do
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
echo "Running $x times" >> ~/script.log
|
||||||
|
echo "TorrentID: $torrentid" >> ~/script.log
|
||||||
|
line=$(deluge-console "connect 127.0.0.1:$ddport; info" $1 | grep "Tracker status")
|
||||||
|
echo $line >> ~/script.log
|
||||||
|
case "$line" in
|
||||||
|
*unregistered*|*Sent*|*End*of*file*|*Bad*Gateway*)
|
||||||
|
deluge-console "connect 127.0.0.1:$ddport; pause '$torrentid'"
|
||||||
|
sleep 2
|
||||||
|
deluge-console "connect 127.0.0.1:$ddport; resume '$torrentid'"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Found working torrent: $torrentname $torrentpath $torrentid" >> ~/script.log
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
x=$(( $x + 1 ))
|
||||||
|
done
|
||||||
|
|
12
sc_update
12
sc_update
@ -1,5 +1,7 @@
|
|||||||
sudo pacman -S archlinux-keyring --noconfirm
|
sudo su <<EOF
|
||||||
sudo pacman-key --init --noconfirm
|
pacman -S archlinux-keyring
|
||||||
sudo pacman-key --populate archlinux --noconfirm
|
pacman-key --init
|
||||||
sudo pacman-key --refresh-keys --noconfirm
|
pacman-key --populate archlinux
|
||||||
sudo pacman -Syyu --noconfirm
|
pacman-key --refresh-keys
|
||||||
|
pacman -Syyu --noconfirm
|
||||||
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user