diff --git a/inc/certs.inc b/inc/certs.inc index f64085ef..bd033e7d 100755 --- a/inc/certs.inc +++ b/inc/certs.inc @@ -678,7 +678,7 @@ COPYCERTS(){ echo -en "${idsCL[LightCyan]}Updating ${idsCL[Green]}${CERTSITE}${spc}${idsCL[LightCyan]}: " COPYTO=${CERTFOLDERS[${i}]} scp le@keepalived.scity.us:/etc/letsencrypt/live/${CERTSITE}/privkey.pem ${COPYTO}/privkey.pem >/dev/null 2>&1 - if ([ -f ${COPYTO}/privkey.pem.md5 ] && ! /usr/bin/md5sum -c ${COPYTO}/privkey.pem.md5 >/dev/null 2>&1) || [ "${1^^}" == "FORCE" ]; then + if ! /usr/bin/md5sum -c ${COPYTO}/privkey.pem.md5 >/dev/null 2>&1 || [ "${1^^}" == "FORCE" ]; then scp le@keepalived.scity.us:/etc/letsencrypt/live/${CERTSITE}/* ${COPYTO}/ >/dev/null 2>&1 rm -f ${COPYTO}/privkey.pem.md5 >/dev/null 2>&1 md5sum ${COPYTO}/privkey.pem > ${COPYTO}/privkey.pem.md5 @@ -697,9 +697,7 @@ COPYCERTS(){ else echo fi - - [ -f /opt/copycerts.sh ] && rm -f /opt/copycerts.sh - + else echo -e "${idsCL[Red]}Config file not complete, missing at least COPYCERT and/or CERTFOLDER variables${idsCL[Default]}\n"