Last active
August 29, 2015 14:12
-
-
Save suciuvlad/a0fb947b430dfaa819d1 to your computer and use it in GitHub Desktop.
upstart config nodejs
This file contains hidden or 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
| ▽ | |
| #!upstart | |
| description "node.js server" | |
| author "vlad suciu" | |
| start on startup | |
| stop on shutdown | |
| script | |
| export HOME="/root" | |
| echo $$ > /var/run/fyves-renderer.pid | |
| exec sudo -u root /usr/local/bin/node /var/deploy/fyves-renderer/app.js >> /var/log/fyves-renderer.sys.log 2>&1 | |
| end script | |
| pre-start script | |
| # Date format same as (new Date()).toISOString() for consistency | |
| echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Starting" >> /var/log/fyves-renderer.sys.log | |
| end script | |
| pre-stop script | |
| rm /var/run/fyves-renderer.pid | |
| echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> /var/log/fyves-renderer.sys.log | |
| end script | |
| ~ | |
| ~ | |
| ~ | |
| ~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment