node-red-run/node-red.service

24 lines
558 B
INI

[Unit]
Description=Node-RED
After=syslog.target network.target
[Service]
# uncomment environment and set for alternative user directory, default is /opt/node-red
# run > sudo systemctl daemon-reload
# Environment=NODE_RED_USER_DIR=/opt/node-red
ExecStart=/bin/bash /opt/node-red-run/run ${NODE_RED_USER_DIR}
Restart=on-failure
KillSignal=SIGINT
# log output to syslog as 'node-red'
SyslogIdentifier=node-red
StandardOutput=syslog
# non-root user to run as
WorkingDirectory=/opt/node-red
User=sysadmin
Group=sysadmin
[Install]
WantedBy=multi-user.target