Skip to content

Instantly share code, notes, and snippets.

@vik-y
Created January 6, 2015 15:48
Show Gist options
  • Save vik-y/32c8ecb85b6c55cda6fb to your computer and use it in GitHub Desktop.
Save vik-y/32c8ecb85b6c55cda6fb to your computer and use it in GitHub Desktop.
Detect Failure in run time of a program and restart it
until <Shell Command to be Executed>; do
echo "Server 'myserver' crashed with exit code $?. Respawning.." >&2
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment