diff --git a/frogg_ssl_check.sh b/frogg_ssl_check.sh index 0ed3d09..eeaf0dc 100755 --- a/frogg_ssl_check.sh +++ b/frogg_ssl_check.sh @@ -101,6 +101,12 @@ function getSSLExpireDayLeft() | cut -d= -f2 \ | xargs -I{} date -d "{}" +%s) + # Vérification : si EXPIRE est vide ou n'est pas un nombre, on renvoie une valeur d'erreur pour Zabbix + if [ -z "$EXPIRE" ] || ! [[ "$EXPIRE" =~ ^[0-9]+$ ]]; then + echo "-1" + exit 1 + fi + # Get today TODAY=$(date +%s)