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/bash | |
export CPU_TEMP_THRESHOLD_FOR_FAN_SPEED_LOW=54 | |
export CPU_TEMP_THRESHOLD_FOR_FAN_SPEED_HIGH=68 | |
export SLEEP_TIME_SECS=10 | |
export GET_CPU_TEMP_FILE=/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input | |
export SET_FAN_SPEED_FILE=/sys/devices/platform/dell_smm_hwmon/hwmon/hwmon*/pwm1 |
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/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
get_file_mime_type() | |
{ | |
local filename=$1 | |
file -b --mime-type "$filename" | |
} |