From da2be22f88c4b38ca5142f9d8dd9ad95848a601c Mon Sep 17 00:00:00 2001 From: larsen0815 Date: Wed, 15 Mar 2023 11:07:42 +0100 Subject: [PATCH] Remove hardcoded path to vcgencmd --- check_rasp_temp.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/check_rasp_temp.sh b/check_rasp_temp.sh index 1356584..2e2abc6 100644 --- a/check_rasp_temp.sh +++ b/check_rasp_temp.sh @@ -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