Created
January 31, 2014 01:53
-
-
Save hazanjon/8725263 to your computer and use it in GitHub Desktop.
Ubuntu Upstart file for Jekyll server
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 "Jekyll node.js server" | |
author "Jon Hazan<[email protected]>" | |
env USER=www-data | |
env SITENAME=yoursite.com | |
env SITEDIR=/var/www/yoursite.com/ | |
env JEKYLL=/usr/local/bin/jekyll | |
#Make sure mounting is completed before starting | |
start on started mountall | |
stop on shutdown | |
# Automatically Respawn: | |
respawn | |
respawn limit 99 5 | |
script | |
export HOME="/root" | |
export LANG="en_US.UTF-8" | |
exec start-stop-daemon --make-pid --start --pidfile /var/run/$SITENAME.pid --chdir $SITEDIR --chuid $USER:$USER --exec $JEKYLL serve -- build --watch >> /var/log/jekyll-$SITENAME.log 2>&1 | |
end script | |
post-start script | |
# Optionally put a script here that will notifiy you node has (re)started | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment