From fa92f01dc809c3ee985c7be224907ddfed0f73a3 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 13 Nov 2023 09:53:12 -0600 Subject: [PATCH] Update certs.inc --- inc/certs.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/certs.inc b/inc/certs.inc index eeef7796..04637a6d 100755 --- a/inc/certs.inc +++ b/inc/certs.inc @@ -392,9 +392,7 @@ LISTCERTS(){ [ ! -f ${NM_FOLDER}/conf/ssl-domain-checks.conf ] && touch ${NM_FOLDER}/conf/ssl-domain-checks.conf echo "${SUBJECT} 443" >> ${NM_FOLDER}/conf/ssl-domain-checks.conf >/dev/null 2&>1 checkcerts_sorted=$(sort <<< "$(cat ${NM_FOLDER}/conf/ssl-domain-checks.conf)") - echo "${NM_NODEMANAGER} - $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | head -n1)" if [ "${NM_NODEMANAGER}" != "$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | head -n1)" ]; then - echo "HERE: CHANGING on MYSQL" ssh root@${NM_NODEMANAGER} "rm -f ${NM_FOLDER}/conf/ssl-domain-checks.conf" #>/dev/null 2&>1 ssh root@${NM_NODEMANAGER} "echo "${checkcerts_sorted}" > ${NM_FOLDER}/conf/ssl-domain-checks.conf" #>/dev/null 2&>1 fi @@ -402,7 +400,10 @@ LISTCERTS(){ # echo "${checkcerts_sorted}" > ${NM_FOLDER}/conf/ssl-domain-checks.conf >/dev/null 2&>1 fi else - sed -i "/${SUBJECT}/d" ${NM_FOLDER}/conf/ssl-domain-checks.conf + if [ "${NM_NODEMANAGER}" != "$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | head -n1)" ]; then + ssh root@${NM_NODEMANAGER} sed -i "/${SUBJECT}/d" ${NM_FOLDER}/conf/ssl-domain-checks.conf + fi + # sed -i "/${SUBJECT}/d" ${NM_FOLDER}/conf/ssl-domain-checks.conf fi echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" echo