Files
bmspy/bmspy-ups.service
T
tim ca641fdda8 Send service output to the journal at once
Set PYTHONUNBUFFERED=1 in the three service files. Python buffers its output if it does not write to a terminal, so log lines reached the journal late.
2026-10-10 10:59:35 +02:00

19 lines
468 B
Desktop File

[Unit]
Description=UPS monitoring for BMS
Requires=bmspy-server.service
[Service]
Type=exec
WorkingDirectory=/usr/local/bmspy
# Send each log line to the journal at once.
Environment=PYTHONUNBUFFERED=1
# Add --device NAME if bmspy-server reads more than one device.
ExecStart=uv run --no-sync bmspy-ups
RestartSec=5
Restart=on-failure
# Status 2 is a wrong option or device name. A restart cannot fix it.
RestartPreventExitStatus=2
[Install]
WantedBy=default.target