Created
April 22, 2017 12:30
-
-
Save jmnsf/edf780a0c87dc211de97c2d6e9043b28 to your computer and use it in GitHub Desktop.
Keep any command running forever
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/sh | |
# Reruns any command when it exits. | |
while : | |
do | |
eval $@ | |
echo "Died... Re-running in 1 second." | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment