diff --git a/check_gps b/check_gps new file mode 100644 index 0000000..498c07e --- /dev/null +++ b/check_gps @@ -0,0 +1,16 @@ +#!/bin/bash + +RetVal=3 +Modus=$(/usr/bin/gpspipe -w -n 10 | jq -r ".mode" | grep "[[:digit:]]" | tail -1) +if [ "$Modus" == "3" ] ; then + echo "OK: GPS 3D-Fix" + RetVal=0 +elif [ "$Modus" == "2" ] ; then + echo "Warning: 2D-Fix" + RetVal=1 +else + echo "Error: No fix or Status unknown" + RetVal=2 +fi + +exit $RetVal \ No newline at end of file