diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 5b098974..34d04ff3 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -740,7 +740,7 @@ NEWCERT(){ if [ -f /etc/letsencrypt/live/${MAIN_CERT}/cert.pem ]; then chown -R root:le /opt/lb-data/letsencrypt chmod -R 6775 /opt/lb-data/letsencrypt - if [ -f /etc/nginx/sites-enabled/${MAIN_CERT} ]; then + if [ -f /etc/nginx/sites-enabled/${MAIN_CERT}.conf ]; then rm -f ${FOLDER}/cert-request.lastrun daterun=`date +%Y-%m-%d-%H-%M-%S` echo -e "${NEW_CERT}\n${daterun}" > ${FOLDER}/cert-request.lastrun