This commit is contained in:
2023-11-14 10:10:03 -06:00
parent 719ad9da54
commit a41af83ba1
3 changed files with 16 additions and 7 deletions

View File

@@ -3,11 +3,13 @@ NEWCERT(){
CERTTEST=0; CERTEXPAND=""
if [ "${3}" != "" ] && ([ ${3} -eq 0 ] || [ ${3} -eq 1 ]); then
NEW_CERT=${1}
NEWSITE=${2}
CERTTEST=${3}
else
while [ $# -gt 0 ]; do
case "${1}" in
-t|-test) CERTTEST=1;;
-newsite) NEWSITE=true;;
-expand) CERTEXPAND='--expand';;
-h|-help|--help)
echo -e "Usage: ${idsCL[Yellow]}[nodemgmt or nmg] newcert {hostname}${idsCL[Default]} {"
@@ -61,7 +63,7 @@ NEWCERT(){
sed -i "s/#ssl_certificate/ssl_certificate/g" ${NM_NGINXPATH}/sites-enabled/${MAIN_CERT}.conf
DIVIDER true
if [ "${2}" != "newsite" ]; then
if [ "${NEWSITE}" != "true" ]; then
echo -e -n "${idsCL[LightCyan]}Restart NGINX on all Nodes (Y/n): ${idsCL[Default]}"
read -n 1 NGINXRELOAD
if [[ ${NGINXRELOAD} =~ ^[Nn]$ ]]; then