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:
parent
03cba89c26
commit
da2be22f88
@ -2,7 +2,6 @@
|
|||||||
# Adapted from check_nagios_latency
|
# Adapted from check_nagios_latency
|
||||||
# https://github.com/larsen0815/check_rasp_temp
|
# https://github.com/larsen0815/check_rasp_temp
|
||||||
|
|
||||||
VCGENCMD="/opt/vc/bin/vcgencmd"
|
|
||||||
|
|
||||||
# Prints usage information
|
# Prints usage information
|
||||||
usage() {
|
usage() {
|
||||||
@ -41,7 +40,7 @@ check_prog() {
|
|||||||
|
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
# check progs
|
check_prog vcgencmd
|
||||||
check_prog awk
|
check_prog awk
|
||||||
check_prog bc
|
check_prog bc
|
||||||
|
|
||||||
@ -78,7 +77,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Perform the checks
|
# 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};;"
|
PERF="temp=${TEMP};${WARNING};${CRITICAL};;"
|
||||||
|
|
||||||
if [ "$LOW" == true ] ; then
|
if [ "$LOW" == true ] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user