bmspy-ups needs --device if the server reads more than one device. The service file now starts it with --device network.
19 lines
496 B
Desktop File
19 lines
496 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
|
|
# The device name is necessary if bmspy-server reads more than one device.
|
|
ExecStart=uv run --no-sync bmspy-ups --device network
|
|
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
|