Created
November 21, 2010 10:35
-
-
Save holderbaum/708628 to your computer and use it in GitHub Desktop.
just call for Example "./neverletdie ssh_bridge.log ssh -vND 1337 my-server.com".. Your SSH-Bridge will stay forever :) (and log failures in ssh_bridge.log)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LOGFILE=$1 | |
shift | |
CMD=$* | |
until $CMD ; do | |
echo "$(date): exited with $?" >> $LOGFILE | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment