desbma / hddfancontrol

Regulate fan speed according to hard drive temperature
GNU General Public License v3.0
137 stars 18 forks source link

Add possibility to restore previous fan settings on exit #43

Closed Trekky12 closed 1 year ago

Trekky12 commented 1 year ago

I really appreciate your work for controlling the fans on NAS devices based on the hdd temperatures. Currently I am testing if the automatic settings on the BIOS or the "manual" settings with your application is more efficient in my use-case. Unfortunately when hddfancontrol is stopped the fans are set to 100%. This leads to some annoying noises when hddfancontrol is only started for testing purposes. Additionally hddfancontrol is also stopped on shutdown which leads to a full speed fan setting when hddfancontrol is already stopped and the device is still not fully shutdown.

This PR adds the new cli switch --restore-fan-settings to restore the fan settings to the values before hddfancontrol was started.

desbma commented 1 year ago

Hi, thank you for the contribution. Please rebase against master branch, I have fixed the CI issues, it will make the review easier.

Trekky12 commented 1 year ago

I have rebased the PR could you approve the CI? 😊

coveralls commented 1 year ago

Coverage Status

coverage: 39.08% (-1.0%) from 40.053% when pulling c507e5d6c815c835dbc1cba428169c789206d8d9 on Trekky12:restore-fan-settings-on-exit into f57d8b6775e5dd170a014044b78c5fa04f158f49 on desbma:master.

desbma commented 1 year ago

You can ignore the coverage, but the lint errors should be fixed, you can see them here https://github.com/desbma/hddfancontrol/actions/runs/5347735245/jobs/9712459974 or via pre-commit run -a.

desbma commented 1 year ago

Merged, thank you.