Created
January 6, 2015 15:48
-
-
Save vik-y/32c8ecb85b6c55cda6fb to your computer and use it in GitHub Desktop.
Detect Failure in run time of a program and restart it
This file contains 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
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