For my personal usecase i need to transfer the downloded data to different nas boxes here at home.
It is possible and a performancegain to do so. Sabnzbdplus allways waits for script and (child/sub)processes to finish.
Scripts are working it gets everything done as ecxpected but i need asynchronus behavior.
does anybody know how to achive this ?
Code: Select all
#!/bin/bash max_thread=2 while [[ ($(pgrep -cf "/root/.dl/scripts/transfer.sh") -ge $max_thread) ]]; do sleep 1 done nohup /root/.dl/scripts/transfer.sh $@ & exit 0