mirror of
https://github.com/runcitadel/core.git
synced 2024-11-15 02:10:45 +00:00
14 lines
392 B
Bash
Executable File
14 lines
392 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# SPDX-FileCopyrightText: 2021 Citadel and contributors
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
# If vcgencmd is available, use it to get the temperature and exit
|
|
if command -v vcgencmd &> /dev/null; then
|
|
echo "$(vcgencmd measure_temp)" | cut -d '=' -f 2 | cut -d '.' -f 1
|
|
exit 0
|
|
fi
|
|
|
|
cat /sys/class/thermal/thermal_zone0/temp | awk '{print int($1/1000)}'
|