#!/bin/bash
#
# Copyright (C) 2018 Purism SPC
#
# SPDX-License-Identifier: GPL-3.0+
#

while true; do
    uptime
    TEMP=$( cat /sys/class/thermal/thermal_zone0/temp )
    echo "A53 Temperature $TEMP"
	if [ -e /sys/class/thermal/thermal_zone1 ]; then
		TEMP=$( cat /sys/class/thermal/thermal_zone1/temp )
		echo "GPU temp $TEMP"
	fi
	if [ -e /sys/class/thermal/thermal_zone2 ]; then
		TEMP=$( cat /sys/class/thermal/thermal_zone2/temp )
		echo "VPU temp $TEMP"
	fi
    sleep 30
done
