Just a quick update: I finally got to the bottom of why the script doesn't retry properly.
It turns out that while...do...done works as expected (whereas do...loop doesn't), so I changed the script above to use that.
I also incorporated dennisMe's suggestion (thanks for that!).
It still leaves `sleep` processes lying around (until they time out), despite trying to clean up afterwards. I haven't figured out how to kill them properly when the script completes, as the captured PID doesn't get the child process.
If anyone knows how to do this properly, please let me know...
Last edited by clanger9; 12-30-2011 at 06:19 AM.
|