Systemd Unit for fancontrol service

This commit is contained in:
luxick
2017-03-09 14:50:21 +01:00
parent 5f75f4dce6
commit b78cf88daa
2 changed files with 11 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
# auto mode. # auto mode.
start() { start() {
echo "Starting Service" echo "Starting Service"
chmod 744 /proc/acpi/ibm/fan
while : while :
do do
CURRENTSPEED=`cat /proc/acpi/ibm/fan | grep level: | awk 'NF>1{print $NF}'` CURRENTSPEED=`cat /proc/acpi/ibm/fan | grep level: | awk 'NF>1{print $NF}'`

10
fancontrol.service Normal file
View File

@@ -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