From b78cf88daabaed12c41f2695128540151d26e429 Mon Sep 17 00:00:00 2001 From: luxick Date: Thu, 9 Mar 2017 14:50:21 +0100 Subject: [PATCH] Systemd Unit for fancontrol service --- fancontrol | 1 + fancontrol.service | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 fancontrol.service diff --git a/fancontrol b/fancontrol index 8987ba9..62cd955 100755 --- a/fancontrol +++ b/fancontrol @@ -4,6 +4,7 @@ # auto mode. start() { echo "Starting Service" + chmod 744 /proc/acpi/ibm/fan while : do CURRENTSPEED=`cat /proc/acpi/ibm/fan | grep level: | awk 'NF>1{print $NF}'` diff --git a/fancontrol.service b/fancontrol.service new file mode 100644 index 0000000..5fe4b26 --- /dev/null +++ b/fancontrol.service @@ -0,0 +1,10 @@ +[Unit] +Description=Monitor and control fan speed + +[Service] +Type=simple +ExecStart=/usr/bin/fancontrol start +ExecStop=/usr/bin/fancontrol stop + +[Install] +WantedBy=multi-user.target