diff --git a/scripts/server_bin/update_itaku.sh b/scripts/server_bin/update_itaku.sh index 7aff7ac..78b8406 100755 --- a/scripts/server_bin/update_itaku.sh +++ b/scripts/server_bin/update_itaku.sh @@ -1,8 +1,11 @@ #!/bin/bash +N=2 cd $HOME/gallery-dl/itaku for i in *; do echo ">> $i" - gallery-dl --abort 3 --sleep 2 https://itaku.ee/profile/$i/gallery - sleep 15 + (gallery-dl --abort 3 --sleep 2 https://itaku.ee/profile/$i/gallery) & + if [[ $(jobs -r -p | wc -l) -ge $N ]]; then + wait -n + fi done