Correciton options

This commit is contained in:
David 2022-12-19 23:35:36 +01:00
parent 0995be0701
commit d3c5974145

View File

@ -2,9 +2,8 @@
CHECK="/usr/lib/nagios/plugins/check_http" CHECK="/usr/lib/nagios/plugins/check_http"
CHECK_OPTS="-S --sni -H visio.chapril.org" CHECK_OPTS="-S --sni -H visio.chapril.org"
#CHECK_OPTS="-I 192.168.1.93 -C 30,14" IP_FRONT='192.168.1.93'
IP_FRONT='0' THRESHOLDS='20,10'
THRESHOLDS='30,14'
usage() { usage() {
echo echo
@ -29,14 +28,14 @@ while getopts ${optstring} arg; do
exit 1 exit 1
;; ;;
i) i)
CHECK_OPTS="${CHECK_OPTS} -I ${OPTARG}" IP_FRONT="${OPTARG}"
;; ;;
C) C)
CHECK_OPTS="${CHECK_OPTS} -C ${OPTARG}" THRESHOLDS="${OPTARG}"
;; ;;
esac esac
done done
res="`${CHECK} ${CHECK_OPTS}`" res="`${CHECK} ${CHECK_OPTS} -I ${IP_FRONT} -C ${THRESHOLDS}`"
ret=${?} ret=${?}
echo "${res}" echo "${res}"
exit ${ret} exit ${ret}