Created
January 13, 2017 00:59
-
-
Save denmojo/30d2e4825a4cb4ac9c172ce787b079e7 to your computer and use it in GitHub Desktop.
Restarting a unix process unless exit 0
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
| until myserver; 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