irrigation/irrigation.service

18 lines
587 B
INI
Raw Permalink Normal View History

# $ loginctl enable-linger USERNAME
# copy this file to /home/USERNAME/.config/USERNAME/user
# then user `systemctl --user` commands (or sdu aliases if set up)
[Unit]
Description=Irrigation Controller Service
After=network-online.target
[Service]
StandardOutput=file:/opt/irrigation/std.log
StandardError=file:/opt/irrigation/err.log
Environment='UCI_ENV=pro UCI_LOG_PATH=/opt/irrigation/irrigation.json.log UCI_LOG_LEVEL=warn'
WorkingDirectory=/opt/irrigation
ExecStart=/usr/bin/node -r esm /opt/irrigation/index.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target