From a847e9d039637f756cd4e34782aa37abe0fb6aac Mon Sep 17 00:00:00 2001 From: desbma Date: Thu, 2 Jan 2025 13:57:53 +0100 Subject: [PATCH] feat: allow changing log level from configuration file --- systemd/hddfancontrol.conf | 10 ++++++---- systemd/hddfancontrol.service | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/systemd/hddfancontrol.conf b/systemd/hddfancontrol.conf index 9d8213c..9ad75c1 100644 --- a/systemd/hddfancontrol.conf +++ b/systemd/hddfancontrol.conf @@ -1,8 +1,10 @@ # -# HDD fan control daemon startup arguments, for use as a systemd service -# This file should be located at /etc/conf.d/hddfancontrol -# -# Run 'hddfancontrol daemon -h' to see help about all available arguments. +# HDD fan control configuration, used when started from a systemd service. +# This file should be located at /etc/conf.d/hddfancontrol. # +# Daemon startup arguments, run 'hddfancontrol daemon -h' to see help about all available arguments. HDDFANCONTROL_DAEMON_ARGS="" + +# Log level, from most to least verbose: trace, debug, info, warn, error. +HDDFANCONTROL_LOG_LEVEL="info" diff --git a/systemd/hddfancontrol.service b/systemd/hddfancontrol.service index 6cf08ec..bbddf2e 100644 --- a/systemd/hddfancontrol.service +++ b/systemd/hddfancontrol.service @@ -5,7 +5,7 @@ After=hddtemp.service [Service] EnvironmentFile=/etc/conf.d/hddfancontrol -ExecStart=/usr/bin/hddfancontrol daemon $HDDFANCONTROL_DAEMON_ARGS +ExecStart=/usr/bin/hddfancontrol -v $HDDFANCONTROL_LOG_LEVEL daemon $HDDFANCONTROL_DAEMON_ARGS # Scheduler priority CPUSchedulingPolicy=rr