Skip to content

Instantly share code, notes, and snippets.

@ivan-leschinsky
Forked from Dianoga/node.service
Created January 30, 2018 21:14
Show Gist options
  • Save ivan-leschinsky/9730dfd258afd67e3c0d27cf00d0047b to your computer and use it in GitHub Desktop.
Save ivan-leschinsky/9730dfd258afd67e3c0d27cf00d0047b to your computer and use it in GitHub Desktop.
systemd .service file for node.js app. Requires forever.
[Unit]
Description=Start Herir Node.js Service
Requires=network.target
After=network.target
[Service]
Type=forking
WorkingDirectory=/srv/hereir/node
ExecStart=/usr/bin/forever start --pidFile /var/run/hereir.pid HereIR.js
ExecStop=/usr/bin/forever stop HereIR.js
PIDFile=/var/run/hereir.pid
User=user
Group=group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment