Created
June 8, 2012 07:26
-
-
Save wuputah/2894214 to your computer and use it in GitHub Desktop.
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 | |
trap 15 terminate | |
terminate() | |
{ | |
echo "!! Received sigterm, letting node cleanup before we exit" | |
sleep 5 | |
echo "!! Exiting" | |
exit 0 | |
} | |
while true; do | |
node index.js | |
echo "!! Program crashed, restarting..." | |
done |
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
web: bin/run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment