Skip to content

Instantly share code, notes, and snippets.

@hito-asa
Created June 1, 2013 05:22
Show Gist options
  • Save hito-asa/5689364 to your computer and use it in GitHub Desktop.
Save hito-asa/5689364 to your computer and use it in GitHub Desktop.
#!/bin/bash
BASE_PATH=/etc
BASE_FILE=$BASE_PATH/thinkfan.conf
if [ $# -lt 1 ]; then
echo "usage: fan full|save"
fi
FILE_USE=${BASE_FILE}.$1
if [ ! -f $FILE_USE ]; then
echo "$FILE_USE not found"
exit 1
fi
echo "========================================"
cat $FILE_USE | grep -ve "^#" | grep -ve "^$"
echo "========================================"
echo ""
echo "yes/no"
read ANS
if [ "$ANS" == "yes" ]; then
cp $FILE_USE $BASE_FILE
echo "restart thinkfan..."
/etc/init.d/thinkfan restart
else
echo "aborted."
fi
sensor /sys/devices/platform/coretemp.0/temp1_input
(0, 0, 37)
(1, 35, 39)
(2, 37, 41)
(3, 39, 43)
(4, 41, 45)
(5, 43, 47)
(7, 45, 32767)
sensor /sys/devices/platform/coretemp.0/temp1_input
(0, 0, 48)
(1, 46, 52)
(2, 50, 56)
(3, 54, 60)
(4, 58, 64)
(5, 62, 68)
(7, 66, 32767)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment