1
0
mirror of https://github.com/larsen0815/check_rasp_temp.git synced 2024-11-24 03:13:50 +01:00

Remove hardcoded path to vcgencmd

This commit is contained in:
larsen0815 2023-03-15 11:07:42 +01:00
parent 03cba89c26
commit da2be22f88

View File

@ -2,7 +2,6 @@
# Adapted from check_nagios_latency
# https://github.com/larsen0815/check_rasp_temp
VCGENCMD="/opt/vc/bin/vcgencmd"
# Prints usage information
usage() {
@ -41,7 +40,7 @@ check_prog() {
# Main
# check progs
check_prog vcgencmd
check_prog awk
check_prog bc
@ -78,7 +77,7 @@ fi
# Perform the checks
TEMP=`$VCGENCMD measure_temp | awk -F"=" '{print $2}' | awk -F"'" '{print $1}'`
TEMP=`vcgencmd measure_temp | awk -F"=" '{print $2}' | awk -F"'" '{print $1}'`
PERF="temp=${TEMP};${WARNING};${CRITICAL};;"
if [ "$LOW" == true ] ; then