check for internet

This commit is contained in:
2024-06-21 02:58:53 +02:00
parent 5c82b2ac9e
commit fd6e2f3537

View File

@ -5,7 +5,15 @@
#gallery-dl --config ./config.json --input-file-delete to_download_r34.txt
if [ ! -s to_download_r34.txt ]; then
#success! just exit
echo "file empty"
exit 0
else
echo "file not empty"
if [ $(ping -qc 3 rule34.xxx) ]; then
echo "has internet"
else
echo "no internet"
exit 1
fi
fi