diff --git a/monitoring/check_gemini.sh b/monitoring/check_gemini.sh index 8b8b361..afeac2a 100755 --- a/monitoring/check_gemini.sh +++ b/monitoring/check_gemini.sh @@ -2,7 +2,7 @@ TLS_CLIENT="/usr/local/bin/gnutls-cli -p 1965" -if [ "$1" = "-h" ] +if [ "$1" = "-h" ] || [ "$1" = "--help" ] then echo "usage: $0 (without gemini:// scheme)" echo @@ -11,6 +11,7 @@ fi errorOutput=$(echo -n "gemini://$1/\r\n" | ${TLS_CLIENT} $1 2>&1 > /dev/null) errorCode=$? + if [ $errorCode -gt 0 ] then echo "ERROR: ${errorOutput}" @@ -19,3 +20,4 @@ else echo "OK: capsule responding" return 0 fi +