Created
May 11, 2019 01:44
-
-
Save natebrunette/e69441315613b23dd1d5af085de68b4a to your computer and use it in GitHub Desktop.
Simple script to restart a command
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
#!/bin/bash | |
echo "Executing: $@" | |
until $("$@") | |
do | |
echo "Process 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