/etc/persistent/fan-override
#!/usr/bin/sh
MAX_TMP=50
WAIT_TIME=300
while true
do
GET_TMP1=$(swctrl env show | grep TEMP-1 | awk '{print $2}')
if [ $MAX_TMP -lt "$GET_TMP1" ]
then
echo "TMP1 = ${GET_TMP1}"
echo "High Temperature detected, turning fans ON."
swctrl fan diagnostic
else
echo "TMP1 = ${GET_TMP1}"
echo "Temp below threshold. All good."
fi
sleep ${WAIT_TIME}
done
/etc/persistent/rc.poststart
#!/usr/bin/sh /etc/persistent/fan-override &
V Unifi switchi aktualne nefunguji poststart skripty tj. je potreba si pomoci pres profile, aby se skript spustil alespon po kliknuti na debug console v unifi controleru
/etc/persistent/profile
#!/usr/bin/sh /etc/persistent/fan-override &
Nakonec je potreba zavolat prikaz, aby se nastaveni ulozilo a prezilo pristi reboot
chmod +x fan-override rc.poststart profile save
…
RASW2-US.6.2.14# save Found Backup1 on[1] ... Found Active on[2] ... Storing Active[1] ... [%100] Active->Backup[2] ... [%100] RASW2-US.6.2.14#
…