#!/bin/sh HIGHLOAD=80 while sleep 5 do load=$(cat /proc/loadavg | cut -d " " -f1 | tr -d ".") if [ "$load" -gt "$HIGHLOAD" ] then /jffs/./gpio enable 2 /jffs/./gpio disable 3 else /jffs/./gpio enable 3 /jffs/./gpio disable 2 fi done Thanks to AzzIzzA and inh for the help we figure it out.. Instead to have a active ssh term open to run the loop just add it to the startup script :) Remember to set the gpio to what ever dir you want