#!/bin/bash

server_cert=$(CreoleGet server_cert)
delay=$(CreoleGet le_expire_delay)
openssl x509 -checkend $((delay*86400)) -noout -enddate -in $server_cert &> /dev/null
if [ ! "$?" = "0" ]; then
    reconfigure
fi
exit 0
