Yes.
That was not helpful at all.
Since it's linux, find a program that will monitor the hardware temperatures (there are numerous ones out there). Then make a shell script and find the temperature output by executing this program with whichever arguments you want. Then, take that output and use a conditional statement to kill your miner processes and spit out an error message if the temp exceeds your desired Tmax. Run this script on a constant loop (using "while true") or with a cron set to every minute.
I'm not at home right now, and unfortunately that means I don't have enough time to lay all this out or even draft anything...but if you've done a shell script before this should be fairly easy.