better help handling for check_gemini
This commit is contained in:
parent
abadf17eec
commit
b833384de9
1 changed files with 3 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
TLS_CLIENT="/usr/local/bin/gnutls-cli -p 1965"
|
TLS_CLIENT="/usr/local/bin/gnutls-cli -p 1965"
|
||||||
|
|
||||||
if [ "$1" = "-h" ]
|
if [ "$1" = "-h" ] || [ "$1" = "--help" ]
|
||||||
then
|
then
|
||||||
echo "usage: $0 <capsule name> (without gemini:// scheme)"
|
echo "usage: $0 <capsule name> (without gemini:// scheme)"
|
||||||
echo
|
echo
|
||||||
|
@ -11,6 +11,7 @@ fi
|
||||||
|
|
||||||
errorOutput=$(echo -n "gemini://$1/\r\n" | ${TLS_CLIENT} $1 2>&1 > /dev/null)
|
errorOutput=$(echo -n "gemini://$1/\r\n" | ${TLS_CLIENT} $1 2>&1 > /dev/null)
|
||||||
errorCode=$?
|
errorCode=$?
|
||||||
|
|
||||||
if [ $errorCode -gt 0 ]
|
if [ $errorCode -gt 0 ]
|
||||||
then
|
then
|
||||||
echo "ERROR: ${errorOutput}"
|
echo "ERROR: ${errorOutput}"
|
||||||
|
@ -19,3 +20,4 @@ else
|
||||||
echo "OK: capsule responding"
|
echo "OK: capsule responding"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue