switch to for loop
also only now does 5 iterations before giving up
This commit is contained in:
@ -20,8 +20,7 @@ download() {
|
||||
[[ -f downloaded_$1.txt ]] || echo -e "${IYELLOW}download_$1.txt doesn't exist${NO_COLOR}" || exit 1
|
||||
cp downloaded_$1.txt to_download_$1.txt
|
||||
|
||||
while [ 1 ]
|
||||
do
|
||||
for ((n=0;n<5;n++)); do
|
||||
gallery-dl --config ./gallery-dl/config.json --input-file-delete to_download_$1.txt
|
||||
|
||||
if [ ! -s to_download_$1.txt ]; then
|
||||
@ -38,6 +37,11 @@ download() {
|
||||
echo -e "${IGREEN}has internet${NO_COLOR}"
|
||||
done
|
||||
|
||||
if [ -s to_download_$1.txt ]; then
|
||||
# exit with some kind of error
|
||||
# service should then send error and fitting message to ntfy
|
||||
fi
|
||||
|
||||
[[ $(hostname) != \s\a\t\a\n ]] && cp ./gallery-dl/archive-$1.sqlite3 /data/backup
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user