Created
March 13, 2015 13:59
-
-
Save colthreepv/6c47bc1dc231e91dd4ce to your computer and use it in GitHub Desktop.
Example upstart script to use with prerender-server https://prerender.io/
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
description "<description here>" | |
author "<[email protected]>" | |
start on filesystem or runlevel [2345] | |
stop on shutdown | |
# Automatically Respawn: | |
respawn | |
respawn limit 3 5 | |
setuid www-data | |
setgid adm | |
env PORT=9000 | |
script | |
exec /usr/local/bin/node /srv/prerender/prerender.js >> /var/log/services/prerender.log 2>&1 | |
end script | |
pre-start script | |
echo "[`date`] prerender listening on http://127.0.0.1:$PORT/" >> /var/log/services/prerender.log | |
end script | |
pre-stop script | |
echo "[`date`] prerender stopping" >> /var/log/services/prerender.log | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment