1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/nodered/templates/nodered.service.j2

34 lines
737 B
Text
Raw Normal View History

2018-06-27 11:17:44 +00:00
[Unit]
Description=Node-RED
After=syslog.target network.target
[Service]
2019-01-31 22:19:35 +00:00
# Ansible template HAD: if is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17
# Ansible template HAD: if is_debuntu
2020-03-04 21:41:48 +00:00
{% if is_raspbian %}
ExecStart=/usr/bin/node-red-pi --max-old-space-size=128 -v
2019-02-12 22:50:01 +00:00
{% else %}
# ExecStart=/usr/local/bin/node-red-pi --max-old-space-size=128 -v
2019-02-12 22:50:01 +00:00
ExecStart=/usr/bin/node-red-pi -v
{% endif %}
2018-06-27 11:17:44 +00:00
Restart=on-failure
KillSignal=SIGINT
# log output to syslog as 'node-red'
SyslogIdentifier=node-red
StandardOutput=syslog
# non-root user to run as
2020-03-04 21:41:48 +00:00
{% if is_raspbian %}
WorkingDirectory=/home/pi/
User=pi
Group=pi
{% else %}
2018-06-27 11:17:44 +00:00
WorkingDirectory=/home/nodered/
User=nodered
Group=nodered
{% endif %}
2018-06-27 11:17:44 +00:00
[Install]
WantedBy=multi-user.target