Last active
October 16, 2020 07:44
-
-
Save imvaskii/9c88209b8097547168d21497336c8bb5 to your computer and use it in GitHub Desktop.
Systemd conf for thinkfan, update temp hwmon before starting the service.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file location: /usr/lib/systemd/system/thinkfan.service | |
[Unit] | |
Description=simple and lightweight fan control program | |
Wants=lm_sensors.service | |
After=lm_sensors.service | |
[Service] | |
Type=forking | |
ExecStart=/home/cybapunkz/.local/bin/thinkfan $THINKFAN_ARGS | |
PIDFile=/run/thinkfan.pid | |
ExecReload=/bin/kill -HUP $MAINPID | |
[Install] | |
WantedBy=multi-user.target | |
Also=thinkfan-wakeup.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
# | |
# file location: /home/cybapunkz/.local/bin/thinkfan | |
# Author: Bhaskar K C <[email protected]> | |
# Move this file to /usr/bin/thinkfan-config | |
sed -i '/^hwmon/d' /etc/thinkfan.conf | |
find /sys/devices -type f -name 'temp*_input' | xargs -I {} echo "hwmon {}" | | |
sed -e '/thinkpad_hwmon\/hwmon\/hwmon[0-9]\/temp2_input$/ s/^/#\ /g' \ | |
>>/etc/thinkfan.conf | |
/usr/bin/thinkfan $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment