roles/hap-nodejs/templates/hap-nodejs.service.j2
author Luke Hoersten <luke@hoersten.org>
Sat, 16 Nov 2019 12:46:02 -0600
changeset 23 a006c668055c
parent 0 30d8bcb1ebb4
permissions -rw-r--r--
Removed base rpi role.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
# {{ansible_managed}}
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
[Unit]
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
Description=HAP-NodeJS
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
[Service]
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
User={{hap_user}}
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
Group={{hap_user}}
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
Restart=always
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
RestartSec={{hap_restart_sec}}
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
WorkingDirectory={{hap_dest}}
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
ExecStart=/usr/bin/node {{hap_dest}}/Core.js
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
[Install]
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
WantedBy=default.target