Skip to content

Instantly share code, notes, and snippets.

@mgarratt
Created October 18, 2013 22:13
Show Gist options
  • Save mgarratt/7049033 to your computer and use it in GitHub Desktop.
Save mgarratt/7049033 to your computer and use it in GitHub Desktop.
Upstart script for Ghost Blog
description "Ghost Blog"
author "Mark Garratt"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
respawn # restart when job dies
# Start the Process
env DIR=/var/www/
env NODE_PATH=/usr/local/lib/node_modules/
env NODE_ENV=production
exec start-stop-daemon --start --chuid www-data --make-pidfile --pidfile /var/run/ghost.pid --chdir ${DIR} --exec /usr/bin/node -- index.js >> /var/log/ghost.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment