From 3299beb6586b41445794068e5ae50ddaafe97b95 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 28 Jun 2024 17:29:20 -0500 Subject: [PATCH] Update certs.inc --- inc/certs.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/certs.inc b/inc/certs.inc index 41273a24..d15ed451 100755 --- a/inc/certs.inc +++ b/inc/certs.inc @@ -706,11 +706,10 @@ export PDNS_Ttl=60 scp -q /tmp/vcenter-update-ssl.sh root@${NM_VC_HOSTNAME}:/tmp/vcenter-update-ssl.sh ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_VC_HOSTNAME} "bash /tmp/vcenter-update-ssl.sh" - echo "HERE: ${NM_VC_ACMEFOLDER}/${NM_VC_HOSTNAME}/${NM_VC_HOSTNAME}.cer" - if [ ! -f ${NM_VC_ACMEFOLDER}/${NM_VC_HOSTNAME}/${NM_VC_HOSTNAME}.cer ]; then + if ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_VC_HOSTNAME} [ ! -f ${NM_VC_ACMEFOLDER}/${NM_VC_HOSTNAME}/${NM_VC_HOSTNAME}.cer ]; then echo -e "${idsCL[LightYellow]}No certificate was created${idsCL[Default]}\n" exit 0 - elif [ $(expr `date +%s` - $(stat -c %Y ${NM_VC_ACMEFOLDER}/${NM_VC_HOSTNAME}/${NM_VC_HOSTNAME}.cer)) -ge 600 ]; then + elif ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_VC_HOSTNAME} [ $(expr `date +%s` - $(stat -c %Y ${NM_VC_ACMEFOLDER}/${NM_VC_HOSTNAME}/${NM_VC_HOSTNAME}.cer)) -ge 600 ]; then echo -e "${idsCL[LightYellow]}The certificate was unable to be updated${idsCL[Default]}\n" exit 0 else