[Dshield] CAUTION email about shell scripting...

Brian Dessent brian at dessent.net
Wed Oct 13 22:19:04 GMT 2004

"Esler, Joel - Contractor" wrote:

> I want the script to connect to the box and run the startup.sh script,
> if it faults (can't establish the connection, something wrong with the
> script on the the box etc...) I want it to wait a bit (20 seconds) then
> try again, and if it STILL fails...  Then email..  I'd like for it to do
> it three times (am I doing this correctly?)

You might want to check out autossh:

It is used to maintain a constant ssh tunnel.  It adds an additional
port forwarding of its own that it uses to send regular keep-alives so
that it will restart the tunnel if there's a timeout, and some other
neat tricks.


More information about the list mailing list