Created
December 8, 2012 17:53
-
-
Save tatic0/4241167 to your computer and use it in GitHub Desktop.
for testing purposes I need to keep a small python http engine alive
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 | |
# launcher.sh | |
while true; do if [[ ! $(ps -ef |egrep "python.*[m]ain") ]] ; then echo "server down"; ./main.py; fi; sleep 10; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment