src.nth.io/

summaryrefslogtreecommitdiff
path: root/roles/hap-nodejs/templates/hap-nodejs.service.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/hap-nodejs/templates/hap-nodejs.service.j2')
-rw-r--r--roles/hap-nodejs/templates/hap-nodejs.service.j216
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/hap-nodejs/templates/hap-nodejs.service.j2 b/roles/hap-nodejs/templates/hap-nodejs.service.j2
new file mode 100644
index 0000000..f657555
--- /dev/null
+++ b/roles/hap-nodejs/templates/hap-nodejs.service.j2
@@ -0,0 +1,16 @@
+# {{ansible_managed}}
+
+[Unit]
+Description=HAP-NodeJS
+
+[Service]
+User={{hap_user}}
+Group={{hap_user}}
+Restart=always
+RestartSec={{hap_restart_sec}}
+
+WorkingDirectory={{hap_dest}}
+ExecStart=/usr/bin/node {{hap_dest}}/Core.js
+
+[Install]
+WantedBy=default.target