Skip to content

Instantly share code, notes, and snippets.

@holderbaum
Created November 21, 2010 10:35
Show Gist options
  • Save holderbaum/708628 to your computer and use it in GitHub Desktop.
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)
#!/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