Skip to content

Instantly share code, notes, and snippets.

@jacoelho
Created August 22, 2016 17:58
Show Gist options
  • Save jacoelho/895e33ee32d6a136e76c01d1f54827e4 to your computer and use it in GitHub Desktop.
Save jacoelho/895e33ee32d6a136e76c01d1f54827e4 to your computer and use it in GitHub Desktop.
node systemd
[Unit]
Description=GPS node
After=network.target
[Service]
User=appuser
Group=appgroup
WorkingDirectory=/var/www/
ExecStart=/usr/bin/node index.js
ExecReload=/bin/kill -HUP $MAINPID
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=gps-api
Restart=always
RestartSec=500ms
StartLimitInterval=0
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment