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"
|
||||
|
||||
if [ "$1" = "-h" ]
|
||||
if [ "$1" = "-h" ] || [ "$1" = "--help" ]
|
||||
then
|
||||
echo "usage: $0 <capsule name> (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
|
||||
|
||||
|
|
Loading…
Reference in a new issue