From afbf4effc315500c29cf700b9f0287d0f31e4ff2 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 25 Apr 2023 12:29:25 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index ba1c23c5..cd0c86a7 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -737,15 +737,15 @@ NEWCERT(){ $CERT_DAEMON certonly --webroot -w /opt/lb-data/letsencrypt-acme-challenge -d ${NEW_CERT} # $CERT_DAEMON certonly --dry-run --webroot -w /var/www/html -d ${NEW_CERT} - if [ -f /etc/letsencrypt/live/${MAIN_CERT}/cert.pem ]; then + if [ -f /opt/lb-data/letsencrypt/live/${MAIN_CERT}/cert.pem ]; then chown -R root:le /opt/lb-data/letsencrypt chmod -R 6775 /opt/lb-data/letsencrypt - touch /etc/letsencrypt/live/${MAIN_CERT}/newcert - if [ -f /etc/nginx/sites-enabled/${MAIN_CERT}.conf ]; then + touch /opt/lb-data/letsencrypt/live/${MAIN_CERT}/newcert + if [ -f /opt/lb-data/letsencrypt/${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 - yes | cp -rfH ${FOLDER}/cert-request.lastrun /etc/letsencrypt/cert-request.lastrun + yes | cp -rfH ${FOLDER}/cert-request.lastrun /opt/lb-data/letsencrypt/cert-request.lastrun DIVIDER true echo -en "${idsCL[LightYellow]}Waiting for Cert replication across the nodes... ${idsCL[Default]}" @@ -755,12 +755,12 @@ NEWCERT(){ if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]]; then checked=false until [ "${checked}" = "" ]; do - checked=`ssh root@${nip} "[ ! -f /etc/letsencrypt/live/${MAIN_CERT}/newcert ] && echo '.'"` + checked=`ssh root@${nip} "[ ! -f /opt/lb-data/letsencrypt/live/${MAIN_CERT}/newcert ] && echo '.'"` done fi fi done - rm -f /etc/letsencrypt/live/${MAIN_CERT}/newcert + rm -f /opt/lb-data/letsencrypt/live/${MAIN_CERT}/newcert echo -e "${idsCL[Green]}Completed${idsCL[Default]}" SERVICE nginx reload fi