forever till success
This commit is contained in:
@ -3,29 +3,20 @@
|
|||||||
#cd /srv/dev-disk-by-uuid-b7a4d72a-4b42-4599-9712-c044e8fe3213/NSFB/Hentai || exit 1
|
#cd /srv/dev-disk-by-uuid-b7a4d72a-4b42-4599-9712-c044e8fe3213/NSFB/Hentai || exit 1
|
||||||
#cp downloaded_r34.txt to_download_r34.txt || exit 1
|
#cp downloaded_r34.txt to_download_r34.txt || exit 1
|
||||||
|
|
||||||
#try once
|
while [ 1 ]
|
||||||
gallery-dl --config ./config.json --input-file-delete to_download_r34.txt
|
do
|
||||||
|
gallery-dl --config ./config.json --input-file-delete to_download_r34.txt
|
||||||
|
|
||||||
if [ ! -s to_download_r34.txt ]; then
|
if [ ! -s to_download_r34.txt ]; then
|
||||||
#success! just exit
|
#success! just exit
|
||||||
echo "file empty"
|
echo "file empty"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
echo "file not empty"
|
||||||
|
|
||||||
echo "file not empty"
|
if [ $(ping -qc 3 rule34.xxx > /dev/null 2>&1) ]; then
|
||||||
if [ $(ping -qc 3 rule34.xxx > /dev/null 2>&1) ]; then
|
echo "no internet"
|
||||||
echo "no internet"
|
exit 1
|
||||||
exit 1
|
fi
|
||||||
else
|
|
||||||
echo "has internet"
|
echo "has internet"
|
||||||
fi
|
done
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
#try again
|
|
||||||
gallery-dl --config ./config.json --input-file-delete to_download_r34.txt
|
|
||||||
|
|
||||||
if [ ! -s to_download_r34.txt ]; then
|
|
||||||
echo "file empty"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
Reference in New Issue
Block a user