pi-temp is a BASH script used to shut down a RaspberryPi if the SoC temperature exceeds a user-set level.
As configured, the script will:
- NOT allow the temperature to exceed 60 degrees Celsius
- Check the temperature every five minutes
These values are configurable, but I take no responsibility for the health of your RaspberryPi while using this script.
- Clone the repository
git clone https://github.com/jj358mhz/pi-temp.git
- Modify it to make it executable
sudo cp tempcheck.sh /usr/local/bin && sudo chmod +x /usr/local/bin/tempcheck.sh
sudo mkdir -p /etc/tempcheck/ && sudo cp tempcheck.conf /etc/tempcheck/
- Modify your crontab (sudo crontab -e) with this line:
*/5 * * * * root /usr/local/bin/tempcheck.sh >/dev/null 2>&1