This commit is contained in:
2025-07-06 11:32:21 -05:00
parent 3a620d800d
commit 5d74d7a668
2 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
VERS='5.6.1-07062025' VERS='5.6.2a-07062025'
NM_BETA=false NM_BETA=false
noheader=' test service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log betacheck offsite-staticroute-fix ' noheader=' test service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log betacheck offsite-staticroute-fix '

View File

@@ -660,7 +660,7 @@ VCENTER-SSL(){
} }
COPYCERTS(){ COPYCERTS(){
if [ -f ${NM_FOLDER}/conf/copycerts.sh.inc ]; then if [ -f ${NM_FOLDER}/conf/copycerts.sh.inc ] && [ "${NM_COPYCERTS_HOST}" ] && [ "${NM_COPYCERTS_PATH}" ]; then
source ${NM_FOLDER}/conf/copycerts.sh.inc source ${NM_FOLDER}/conf/copycerts.sh.inc
if [ "${COPYCERT}" ] && [ "${CERTFOLDER}" ]; then if [ "${COPYCERT}" ] && [ "${CERTFOLDER}" ]; then
@@ -677,12 +677,12 @@ COPYCERTS(){
c=0; spc=''; until [ $c = $(expr 35 - ${#CERTSITE}) ]; do spc="${spc} "; c=$(expr ${c} + 1); done c=0; spc=''; until [ $c = $(expr 35 - ${#CERTSITE}) ]; do spc="${spc} "; c=$(expr ${c} + 1); done
echo -en "${idsCL[LightCyan]}Updating ${idsCL[Green]}${CERTSITE}${spc}${idsCL[LightCyan]}: " echo -en "${idsCL[LightCyan]}Updating ${idsCL[Green]}${CERTSITE}${spc}${idsCL[LightCyan]}: "
COPYTO=${CERTFOLDERS[${i}]} COPYTO=${CERTFOLDERS[${i}]}
scp le@keepalived.scity.us:/etc/letsencrypt/live/${CERTSITE}/privkey.pem ${COPYTO}/privkey.pem >/dev/null 2>&1 scp le@${NM_COPYCERTS_HOST}:${NM_COPYCERTS_PATH}/${CERTSITE}/privkey.pem ${COPYTO}/privkey.pem >/dev/null 2>&1
if ! /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 scp le@${NM_COPYCERTS_HOST}:${NM_COPYCERTS_PATH}/${CERTSITE}/* ${COPYTO}/ >/dev/null 2>&1
rm -f ${COPYTO}/privkey.pem.md5 >/dev/null 2>&1 rm -f ${COPYTO}/privkey.pem.md5 >/dev/null 2>&1
md5sum ${COPYTO}/privkey.pem > ${COPYTO}/privkey.pem.md5 md5sum ${COPYTO}/privkey.pem > ${COPYTO}/privkey.pem.md5
# RUN_POST_COMMANDS=true RUN_POST_COMMANDS=true
touch ${NM_LOGFOLDER}/copycerts.lastrun touch ${NM_LOGFOLDER}/copycerts.lastrun
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"
else else
@@ -699,11 +699,11 @@ COPYCERTS(){
fi fi
else else
echo -e "${idsCL[Red]}Config file not complete, missing at least COPYCERT and/or CERTFOLDER variables${idsCL[Default]}\n" echo -e "${idsCL[Red]}Config file not complete, missing at least \${COPYCERT} and/or \${CERTFOLDER} variables${idsCL[Default]}\n"
fi fi
else else
echo -e "${idsCL[Red]}No ${NM_FOLDER}/conf/copycerts.sh.inc config file found${idsCL[Default]}\n" echo -e "${idsCL[Red]}No ${NM_FOLDER}/conf/copycerts.sh.inc config file found, or missing \${NM_COPYCERTS_HOST} and/or \${NM_COPYCERTS_PATH} variables${idsCL[Default]}\n"
fi fi
} }