Skip to content

Instantly share code, notes, and snippets.

@clrung
Created April 6, 2016 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clrung/e9c1edb98d6cdcb7863b7fd0da23fe16 to your computer and use it in GitHub Desktop.
Save clrung/e9c1edb98d6cdcb7863b7fd0da23fe16 to your computer and use it in GitHub Desktop.
Service to generate jekyll sites
description "Jekyll"
author "Christopher Rung<clrung@gmail.com>"
# adapted from https://gist.github.com/hazanjon/8725263#file-jekyll-conf
env SITENAME=[site name here-just used for log name; I used christopherrung.com]
env SOURCE=[Jekyll source directory; I used /home/clrung/Dropbox/website]
env SITEDIR=[output directory here; I used /var/www/christopherrung.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 $JEKYLL build --watch --incremental -s $SOURCE -d $SITEDIR >> /var/log/jekyll-$SITENAME.log
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment