Skip to content

Instantly share code, notes, and snippets.

@tatic0
Created December 8, 2012 17:53
Show Gist options
  • Save tatic0/4241167 to your computer and use it in GitHub Desktop.
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
#!/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