From 6cc9ec30f7cfc5fdea15e0d43d54cc85c4344988 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 30 Dec 2015 21:53:38 +0000 Subject: [PATCH] example systemd service --- etc/holepunch.service | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 etc/holepunch.service diff --git a/etc/holepunch.service b/etc/holepunch.service new file mode 100644 index 0000000..81aba92 --- /dev/null +++ b/etc/holepunch.service @@ -0,0 +1,17 @@ +# https://www.digitalocean.com/community/tutorials/how-to-deploy-node-js-applications-using-systemd-and-nginx +# goes in /etc/systemd/system/holepunch.service +# systemctl enable holepunch +# systemctl start holepunch + +[Service] +ExecStart=/usr/local/bin/node /srv/holepunch/bin/service.js +Restart=always +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=node-holepunch +User=root +Group=root +Environment=NODE_ENV=production + +[Install] +WantedBy=multi-user.target