https://github.com/javadr/autothinkfan
A simple bash script to make thinkfan.conf automatically
https://github.com/javadr/autothinkfan
fan-control thinkpad
Last synced: about 1 month ago
JSON representation
A simple bash script to make thinkfan.conf automatically
- Host: GitHub
- URL: https://github.com/javadr/autothinkfan
- Owner: javadr
- License: agpl-3.0
- Created: 2021-11-09T12:16:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-19T10:03:18.000Z (almost 3 years ago)
- Last Synced: 2026-03-09T03:35:49.028Z (4 months ago)
- Topics: fan-control, thinkpad
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# autothinkfan
This script makes `/etc/thinkfan.conf` automatically based on the new locations of devices and fans of your machine.
# Requirements
It just relies on the [thinkfan](https://github.com/vmatare/thinkfan) (the minimalist fan control program).
# Usage
Make the script executable with following command and then run it.
```
chmod a+x autothinkfan
./autothinkfan
```
# Configure `systemctl` to run at every boot
As the location of devices might be relocated at boot time, it would be more convenient to configure it automatically at every boot. The following will help you to get rid of running the script manually.
```
$ chmod a+x autothinkfan
$ sudo mv autothinkfan /usr/bin
$ echo "#/etc/systemd/system/autothinkfan.service
[Unit]
Description=Thinkfan Auto Config
Wants=lm_sensors.service
After=lm_sensors.service
After=thinkpad_acpi.service
Wants=thinkfan.service
Before=thinkfan.service
[Service]
Type=oneshot
ExecStart=/usr/bin/bash /usr/bin/autothinkfan
[Install]
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/autothinkfan.service
$ sudo chmod 644 /etc/systemd/system/autothinkfan.service
$ sudo systemctl enable autothinkfan.service --now
```