Skip to content

Instantly share code, notes, and snippets.

@Silvenga
Last active August 29, 2015 13:57
Show Gist options
  • Save Silvenga/9716678 to your computer and use it in GitHub Desktop.
Save Silvenga/9716678 to your computer and use it in GitHub Desktop.
Ghost Upstart Script
start on filesystem and started networking
stop on shutdown
author "Mark Lopez"
description "Ghost Upstart Job"
version "0.2"
respawn
respawn limit 5 30
env name=ghost
env uid=www-data
env gid=www-data
env daemon=/usr/bin/node
env path=/var/www/ghost/index.js
script
export NODE_ENV=production
exec start-stop-daemon --start --make-pidfile --pidfile /var/run/$name.pid --name $name -c $uid:$gid -x $daemon $path >> /var/log/upstart/$name.log 2>&1
end script
@Silvenga
Copy link
Author

Fixed issue on startup when filesystem is not mounted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment