mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
添加风扇启动
This commit is contained in:
parent
47fe97caf6
commit
b8ef4e19ad
4 changed files with 19 additions and 220 deletions
18
openmptcprouter/files/etc/init.d/fengshan
Executable file
18
openmptcprouter/files/etc/init.d/fengshan
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=20
|
||||
start()
|
||||
{
|
||||
tem=$(cat /sys/class/thermal/thermal_zone0/temp)
|
||||
echo $tem
|
||||
if [ $tem -ge 60000 ]
|
||||
then
|
||||
echo 1 > /sys/class/leds/green:fengshan/brightness
|
||||
fi
|
||||
if [ $tem -le 50000 ]
|
||||
then
|
||||
echo 0 > /sys/class/leds/green:fengshan/brightness
|
||||
#echo 14 >/sys/class/gpio/unexport
|
||||
echo "temdown"
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue