diff --git a/bmspy-influxdb.service b/bmspy-influxdb.service index 7734003..492fdf5 100644 --- a/bmspy-influxdb.service +++ b/bmspy-influxdb.service @@ -5,6 +5,8 @@ Requires=bmspy-server.service [Service] Type=exec WorkingDirectory=/usr/local/bmspy +# Send each log line to the journal at once. +Environment=PYTHONUNBUFFERED=1 ExecStart=uv run --no-sync bmspy-influxdb --url http://localhost/ --org 0987654321 --bucket bms --token XXXX RestartSec=5 Restart=on-failure diff --git a/bmspy-server.service b/bmspy-server.service index 2281235..99b71a9 100644 --- a/bmspy-server.service +++ b/bmspy-server.service @@ -5,6 +5,8 @@ Description=Make BMS data available for consumers Type=exec # The full path of the git repo on your system WorkingDirectory=/usr/local/bmspy +# Send each log line to the journal at once. +Environment=PYTHONUNBUFFERED=1 ExecStartPre=/usr/bin/install -d -onobody -gdialout -m770 /run/bmspy ExecStart=uv run --no-sync bmspy-server RestartSec=5 diff --git a/bmspy-ups.service b/bmspy-ups.service index 412487d..aba2963 100644 --- a/bmspy-ups.service +++ b/bmspy-ups.service @@ -5,6 +5,8 @@ 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