Created
July 7, 2014 17:17
-
-
Save missinglink/fdec4bd4fb4926bc37dc to your computer and use it in GitHub Desktop.
Pelias Upstart Script
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 "pelias server" | |
| author "wiz@wiz.co.nz" | |
| start on startup | |
| stop on shutdown | |
| script | |
| export HOME="/var/www/pelias-webview" | |
| export NODE_ENV="production" | |
| chdir "/var/www/pelias-webview" | |
| echo $$ > /var/run/pelias.pid | |
| exec /usr/local/bin/node /var/www/pelias-webview/app.js >> /var/log/pelias.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/pelias.sys.log | |
| end script | |
| pre-stop script | |
| rm /var/run/pelias.pid | |
| echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> /var/log/pelias.sys.log | |
| end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment