From b1eb93e5758dbf9d45015c962ccd3b9313e6e552 Mon Sep 17 00:00:00 2001 From: Martin Sekera Date: Mon, 13 Apr 2020 21:59:43 +0200 Subject: [PATCH] fix systemd service wrong path fix minor mistakes in log output --- fand.py | 4 ++-- fand.service | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fand.py b/fand.py index 10e3a6e..5c3c368 100755 --- a/fand.py +++ b/fand.py @@ -107,7 +107,7 @@ def linlut(a, seq): return smaller[1] + ratio * dy def printf(fmt, *args, stream=sys.stderr): - print(fmt % args, file=stream) + print(fmt % args, file=stream, flush=True) if __name__ == "__main__": try: @@ -125,7 +125,7 @@ if __name__ == "__main__": if cfg.control.verbose: printf("%.01f °C -> %d %% (%d/%d µs)", - temperature, + temperature / 1000, percentage, p.duty_cycle // 1000, p.period // 1000 diff --git a/fand.service b/fand.service index e65761d..32a43dc 100644 --- a/fand.service +++ b/fand.service @@ -2,7 +2,7 @@ Description=Fand fan controller [Service] -ExecStart=/usr/bin/python3 /usr/lib/fand/fand.py +ExecStart=/usr/bin/python3 /usr/share/fand/fand.py Restart=always RestartSec=25