Update certs.inc

This commit is contained in:
2023-11-13 10:06:01 -06:00
parent 5242ce858e
commit 28067a32e2

View File

@@ -392,18 +392,18 @@ 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)")
rm -f ${NM_FOLDER}/conf/ssl-domain-checks.conf >/dev/null 2&>1
echo "${checkcerts_sorted}" > ${NM_FOLDER}/conf/ssl-domain-checks.conf >/dev/null 2&>1
if [ "${NM_NODEMANAGER}" != "$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | head -n1)" ]; then
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'
scp ${NM_FOLDER}/conf/ssl-domain-checks.conf root@${NM_NODEMANAGER}:${NM_FOLDER}/conf/ssl-domain-checks.conf
fi
# rm -f ${NM_FOLDER}/conf/ssl-domain-checks.conf >/dev/null 2&>1
# 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 >/dev/null 2&>1
if [ "${NM_NODEMANAGER}" != "$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | head -n1)" ]; then
run=$(ssh root@${NM_NODEMANAGER} sed -i "/${SUBJECT}/d" ${NM_FOLDER}/conf/ssl-domain-checks.conf) >/dev/null 2&>1
scp ${NM_FOLDER}/conf/ssl-domain-checks.conf root@${NM_NODEMANAGER}:${NM_FOLDER}/conf/ssl-domain-checks.conf
fi
# sed -i "/${SUBJECT}/d" ${NM_FOLDER}/conf/ssl-domain-checks.conf >/dev/null 2&>1
fi
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"
echo