Skip to content

Instantly share code, notes, and snippets.

@prafiles
Last active April 9, 2021 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prafiles/05da0e8848fe700554b45ae26bad9cea to your computer and use it in GitHub Desktop.
Save prafiles/05da0e8848fe700554b45ae26bad9cea to your computer and use it in GitHub Desktop.
Onion Omega Fan Control
#To be located inside /root/fan_control of the filesystem
#!/bin/sh
/usr/sbin/relay-exp -i all 1
sleep 60
echo "Initialization of relays for fans done."
while :
do
echo "Switching to relay 0"
/usr/sbin/relay-exp 0 1
/usr/sbin/relay-exp 1 0
sleep 3600
echo "Switching to relay 1"
/usr/sbin/relay-exp 0 0
/usr/sbin/relay-exp 1 1
sleep 3600
done
# Add following to /etc/rc.local to autostart the above script
# To retail all fan control history, change single arrow to double arrow in the following command
(sh /root/fan_control/fan_control.sh > /root/fan_control/fan_control.log)&
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment