From fd6e2f3537824cc0b08f63123e4d763789ae41dc Mon Sep 17 00:00:00 2001 From: AustrianToast Date: Fri, 21 Jun 2024 02:58:53 +0200 Subject: [PATCH] check for internet --- Rule34/gallery-dl.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Rule34/gallery-dl.sh b/Rule34/gallery-dl.sh index d1bffdc..7b86974 100755 --- a/Rule34/gallery-dl.sh +++ b/Rule34/gallery-dl.sh @@ -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