Just a pointer for
10 awesome things to do with cURL (follow the link)
What I want at the moment is to check internet connectivity with curl, wait while not connected... and then jump on to it's work once the internet comes back on! This needs to be done in shell!
Something like this: