Last active
August 29, 2015 13:57
-
-
Save Silvenga/9716678 to your computer and use it in GitHub Desktop.
Ghost Upstart Script
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed issue on startup when filesystem is not mounted.