Timeout fixes for bad VPN's
This commit is contained in:
parent
726ece669b
commit
ad5208ab6b
@ -6,9 +6,9 @@ if [ "$(pgrep -afc wolfpack)" -ne 1 ]; then
|
|||||||
fi
|
fi
|
||||||
/usr/local/bin/wolfpack --alpha
|
/usr/local/bin/wolfpack --alpha
|
||||||
sleep 10
|
sleep 10
|
||||||
rsync -avz /srv/yggdrasil/new_acquisition/* cxford@10.0.1.3:/srv/yggdrasil/new_acquisition &>>/var/log/wolfpack.log
|
rsync -avz /srv/yggdrasil/new_acquisition/* cxford@10.0.1.3:/srv/yggdrasil/new_acquisition 2>&1 | tee -a /var/log/wolfpack.log
|
||||||
ls -l /srv/yggdrasil/new_acquisition >> /var/log/wolfpack.log
|
ls -l /srv/yggdrasil/new_acquisition | tee -a /var/log/wolfpack.log
|
||||||
echo Files transferred from $(uname -n). >> /var/log/wolfpack.log
|
echo Files transferred from $(uname -n). | tee -a /var/log/wolfpack.log
|
||||||
rm -Rf /srv/yggdrasil/new_acquisition/*
|
rm -Rf /srv/yggdrasil/new_acquisition/*
|
||||||
cat /var/log/wolfpack.log | ssh cxford@aninix.net "cat >> /var/log/wolfpack.log"
|
cat /var/log/wolfpack.log | ssh cxford@aninix.net "cat >> /var/log/wolfpack.log"
|
||||||
rm /var/log/wolfpack.log
|
rm /var/log/wolfpack.log
|
||||||
|
8
wolfpack
8
wolfpack
@ -57,7 +57,7 @@ function nextairdate {
|
|||||||
echo "Need a show to search for"
|
echo "Need a show to search for"
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
lynx --dump "https://www.episodate.com/tv-show/$(echo $1 | tr '[:upper:]' '[:lower:]' | tr ' ' '-')?season=99" | grep 'and airs on' | sed 's# Season [0-9] / Episode [0-9][0-9] and airs on ##'
|
lynx -read_timeout=5 -connect_timeout=5 --dump "https://www.episodate.com/tv-show/$(echo $1 | tr '[:upper:]' '[:lower:]' | tr ' ' '-')?season=99" 2>&1 | grep 'and airs on' | sed 's# Season [0-9]\+ / Episode [0-9]\+ and airs on ##'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ function torrent {
|
|||||||
for i in $(tail -n +3 "$1"); do
|
for i in $(tail -n +3 "$1"); do
|
||||||
getmagnetlink "$i"
|
getmagnetlink "$i"
|
||||||
if [ "$magnetlink" != "" ]; then
|
if [ "$magnetlink" != "" ]; then
|
||||||
/usr/bin/transmission-cli -d 1000 -u 1 -er -w "$downloaddir" -b -f "/usr/local/bin/wolfpack-stoptorrent" "$magnetlink"
|
/usr/bin/transmission-cli -d 600 -u 1 -er -w "$downloaddir" -b -f "/usr/local/bin/wolfpack-stoptorrent" "$magnetlink"
|
||||||
sed -i "/$i/d" "$1"
|
sed -i "/$i/d" "$1"
|
||||||
echo Downloaded and removed $i | tee -a $logfile
|
echo Downloaded and removed $i | tee -a $logfile
|
||||||
fi
|
fi
|
||||||
@ -111,7 +111,7 @@ function shows {
|
|||||||
if [ "$magnetlink" != "" ]; then
|
if [ "$magnetlink" != "" ]; then
|
||||||
# We found an episode.
|
# We found an episode.
|
||||||
echo $i | tee -a $logfile
|
echo $i | tee -a $logfile
|
||||||
# /usr/bin/transmission-cli -d 600 -u 1 -er -w "$downloaddir" -b -f "/usR/Local/bin/wolfpack-stoptorrent" "$magnetlink"
|
/usr/bin/transmission-cli -d 300 -u 1 -er -w "$downloaddir" -b -f "/usr/local/bin/wolfpack-stoptorrent" "$magnetlink"
|
||||||
sed -i "s/$i/S${season}E${newep}#${showName}#${modifier}/" "$1"
|
sed -i "s/$i/S${season}E${newep}#${showName}#${modifier}/" "$1"
|
||||||
echo Downloaded and pup updated. | tee -a $logfile
|
echo Downloaded and pup updated. | tee -a $logfile
|
||||||
rm -Rf ~/.config/transmission/resume/*
|
rm -Rf ~/.config/transmission/resume/*
|
||||||
@ -165,7 +165,7 @@ function download {
|
|||||||
echo Deduped! Removed $i from $downloaddir | tee -a $logfile
|
echo Deduped! Removed $i from $downloaddir | tee -a $logfile
|
||||||
rm -Rf $i;
|
rm -Rf $i;
|
||||||
done
|
done
|
||||||
wget -q -O "$filename" "$nexturl"
|
wget --timeout=5 -q -O "$filename" "$nexturl"
|
||||||
echo Downloaded | tee -a $logfile
|
echo Downloaded | tee -a $logfile
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user