[LG Optimus G (International)] gu5t3r:
89thermald for 1512 as max

#!/system/bin/sh
LOG="/data/local/tmp/${0##*/}";
if [ -f "${LOG}.log" ]; then cp -f "${LOG}.log" "${LOG}2.log"; fi;
exec &>"${LOG}.log";

tsens_tz_sensor7=/sys/class/thermal/thermal_zone7/temp;
tsens_tz_sensor8=/sys/class/thermal/thermal_zone8/temp;
tsens_tz_sensor9=/sys/class/thermal/thermal_zone9/temp;
tsens_tz_sensor10=/sys/class/thermal/thermal_zone10/temp;
pa_therm0=/sys/class/thermal/thermal_zone11/temp;

renice 12 $$;
function Date () { date +"%y-%m-%d %T"; }
echo "[${0##*/}] ($(Date)) (Nice=$(nice)) (Temp=$(cat $pa_therm0))"$'\n';
if [ ! -f $pa_therm0 ]; then echo 'ERROR pa_therm0'; exit 1; fi
if [ ! -f $tsens_tz_sensor7 ]; then echo 'ERROR tsens_tz_sensor7'; exit 1; fi
if [ ! -f $tsens_tz_sensor8 ]; then echo 'ERROR tsens_tz_sensor8'; exit 1; fi
if [ ! -f $tsens_tz_sensor9 ]; then echo 'ERROR tsens_tz_sensor9'; exit 1; fi
if [ ! -f $tsens_tz_sensor10 ]; then echo 'ERROR tsens_tz_sensor10'; exit 1; fi
CPU=/sys/devices/system/cpu;
MAX=cpufreq/scaling_max_freq;
LMT=0;

function SetCPU () {
if [ "$LMT" -ne "$1" ]; then
for CN in 1 2 3; do
echo 1 >$CPU/cpu$CN/online;
echo "$1" >$CPU/cpu$CN/$MAX;
done
LMT="$1";
echo "SetCPU ($(Date)): Freq Limit = $1";
fi
}

function ThermalD () {
while :; do
Temps="$(cat $pa_therm0 $tsens_tz_sensor7 $tsens_tz_sensor8 $tsens_tz_sensor9 $tsens_tz_sensor10)";
MTemp="${Temps%%$'\n'*}";
#### Mainboard Temperature Check ####
if [ "$MTemp" -lt 50000 ]; then SetCPU 1512000;
elif [ "$MTemp" -lt 55000 ]; then SetCPU 1350000;
elif [ "$MTemp" -lt 60000 ]; then SetCPU 1134000;
elif [ "$MTemp" -lt 65000 ]; then SetCPU 1026000;
else
SetCPU 810000;
fi
#### CORE0-3 Temperature Check ####
for eCT in ${Temps#*$'\n'}; do
if [ "$eCT" -gt 100 ]; then
echo "SetCPU ($(Date)): CPU Temp Too High...Powering OFF...";
sync; poweroff; break;
fi
done
sleep 10;
done
}
stop thermald;
ThermalD & exit 0;

89thermald for 1728 as max

#!/system/bin/sh
LOG="/data/local/tmp/${0##*/}";
if [ -f "${LOG}.log" ]; then cp -f "${LOG}.log" "${LOG}2.log"; fi;
exec &>"${LOG}.log";

tsens_tz_sensor7=/sys/class/thermal/thermal_zone7/temp;
tsens_tz_sensor8=/sys/class/thermal/thermal_zone8/temp;
tsens_tz_sensor9=/sys/class/thermal/thermal_zone9/temp;
tsens_tz_sensor10=/sys/class/thermal/thermal_zone10/temp;
pa_therm0=/sys/class/thermal/thermal_zone11/temp;

renice 12 $$;
function Date () { date +"%y-%m-%d %T"; }
echo "[${0##*/}] ($(Date)) (Nice=$(nice)) (Temp=$(cat $pa_therm0))"$'\n';
if [ ! -f $pa_therm0 ]; then echo 'ERROR pa_therm0'; exit 1; fi
if [ ! -f $tsens_tz_sensor7 ]; then echo 'ERROR tsens_tz_sensor7'; exit 1; fi
if [ ! -f $tsens_tz_sensor8 ]; then echo 'ERROR tsens_tz_sensor8'; exit 1; fi
if [ ! -f $tsens_tz_sensor9 ]; then echo 'ERROR tsens_tz_sensor9'; exit 1; fi
if [ ! -f $tsens_tz_sensor10 ]; then echo 'ERROR tsens_tz_sensor10'; exit 1; fi
CPU=/sys/devices/system/cpu;
MAX=cpufreq/scaling_max_freq;
LMT=0;

function SetCPU () {
if [ "$LMT" -ne "$1" ]; then
for CN in 1 2 3; do
echo 1 >$CPU/cpu$CN/online;
echo "$1" >$CPU/cpu$CN/$MAX;
done
LMT="$1";
echo "SetCPU ($(Date)): Freq Limit = $1";
fi
}

function ThermalD () {
while :; do
Temps="$(cat $pa_therm0 $tsens_tz_sensor7 $tsens_tz_sensor8 $tsens_tz_sensor9 $tsens_tz_sensor10)";
MTemp="${Temps%%$'\n'*}";
#### Mainboard Temperature Check ####
if [ "$MTemp" -lt 50000 ]; then SetCPU 1728000;
elif [ "$MTemp" -lt 53000 ]; then SetCPU 1620000;
elif [ "$MTemp" -lt 56000 ]; then SetCPU 1512000;
elif [ "$MTemp" -lt 59000 ]; then SetCPU 1350000;
elif [ "$MTemp" -lt 62000 ]; then SetCPU 1134000;
elif [ "$MTemp" -lt 65000 ]; then SetCPU 1026000;
else
SetCPU 810000;
fi
#### CORE0-3 Temperature Check ####
for eCT in ${Temps#*$'\n'}; do
if [ "$eCT" -gt 100 ]; then
echo "SetCPU ($(Date)): CPU Temp Too High...Powering OFF...";
sync; poweroff; break;
fi
done
sleep 10;
done
}
stop thermald;
ThermalD & exit 0;

Edit: I simplified script code; using freq as level...

Edit2: Reduced cat usage from 2 to only once every 10 seconds; preserving second log in case of poweroff