various scripts for various tasks.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

23 lines
405 B

#!/bin/sh
TLS_CLIENT="/usr/local/bin/gnutls-cli -p 1965"
if [ "$1" = "-h" ] || [ "$1" = "--help" ]
then
echo "usage: $0 <capsule name> (without gemini:// scheme)"
echo
return 0
fi
errorOutput=$(echo -n "gemini://$1/\r\n" | ${TLS_CLIENT} $1 2>&1 > /dev/null)
errorCode=$?
if [ $errorCode -gt 0 ]
then
echo "ERROR: ${errorOutput}"
return 2
else
echo "OK: capsule responding"
return 0
fi