/ stdout

f5 ltm ssl cert expiration warner

#!/bin/bash 
TO=support@example.com 
LOGFILE=/var/tmp/checkcert.log 
TEXT=/opt/scripts/checkcertandmail.txt 
/usr/bin/checkcert -d /config/ssl/ssl.crt/ -o > $LOGFILE 
# LOGFILE is empty if all certs are OK 
if [ -s $LOGFILE ] ; then 
  cat $TEXT $LOGFILE | mail -s "F5 SSL Certificate warning!" $TO 
fi