From fa969e3650dc9ba43665239f6364c3e4c00d2f63 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 14 Nov 2023 19:33:18 -0600 Subject: [PATCH] Update certs.inc --- inc/certs.inc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/inc/certs.inc b/inc/certs.inc index c5ba69d4..a198913a 100755 --- a/inc/certs.inc +++ b/inc/certs.inc @@ -597,6 +597,25 @@ CHECK_NPMCERTS(){ } CHECK-CERTS(){ + HELP(){ + echo -e "Usage: ${idsCL[Yellow]}[nodemgmt or nmg] newcert {hostname}${idsCL[Default]} {" + width=35 + printf "%-${width}s- %s\n" " {hostname}" "(optional: enter hostname for new cert, comma-delimited for multiple)" + printf "%-${width}s- %s\n" " -t|-test" "(enables dry-run mode for CertBot)" + echo -e "}\n" + exit 0 + } + while [ $# -gt 0 ]; do + case "${1}" in + -newsite) NEWSITE=true;; + -expand) CERTEXPAND='--expand';; + -h|-help|--help) + ;; + *) NEW_CERT=${1};; + esac + shift + done + if [ "${1}" == "check" ]; then rm -f ${NM_LOGFOLDER}/ssl-cert-check.lastrun ${NM_FOLDER}/ssl-cert-check/ssl-cert-check -f ${NM_FOLDER}/conf/ssl-domain-checks.conf > ${NM_LOGFOLDER}/ssl-cert-check.lastrun