This commit is contained in:
2023-06-30 18:07:14 -05:00
parent 1a84ff25b8
commit 2af736529c
9 changed files with 67 additions and 67 deletions

View File

@@ -17,7 +17,7 @@ NEWCERT(){
fi
if [ "${NEW_CERT}" != "" ]; then
echo -e "${idsCL[LightGreen]}Requesting Certificate for '${idsCL[Yellow]}${NEW_CERT}${idsCL[LightGreen]}'...${idsCL[Default]}"
echo ""
echo
# echo -en "${idsCL[LightYellow]}Stopping other Webservers... ${idsCL[Default]}"
# for nip in "${WEB_HOSTS[@]}"; do
@@ -89,7 +89,7 @@ NEWCERT(){
# done
# echo -e "${idsCL[Green]}Completed${idsCL[Default]}"
echo ""
echo
if [ -z $action ] || [ "${action}" = "gui" ]; then
DIVIDER true
ENTER2CONTINUE
@@ -106,21 +106,21 @@ DEL-SSL(){
if [ -z ${1+x} ]; then
echo -e -n "${idsCL[LightCyan]}Delete what SSL site address: ${idsCL[Default]}"
read DEL_SSL
echo ""
echo
else
DEL_SSL=${1}
fi
if [ ! -z ${DEL_SSL+x} ] && [ "${DEL_SSL}" != "" ]; then
if [ -d /etc/letsencrypt/live/${DEL_SSL} ]; then
echo -e "${idsCL[LightRed]}Deleting the SSL certificates for '${idsCL[Red]}${DEL_SSL}${idsCL[LightRed]}'...${idsCL[Default]}"
echo ""
echo
echo -en "${idsCL[LightRed]}Removing Files and Folders... ${idsCL[Default]}"
rm -rf /etc/letsencrypt/archive/${DEL_SSL}
rm -rf /etc/letsencrypt/live/${DEL_SSL}
rm -f /etc/letsencrypt/renewal/${DEL_SSL}.conf
echo -e "${idsCL[Green]}OK${idsCL[Default]}"
echo ""
echo
else
@@ -160,7 +160,7 @@ CERTRENEW(){
echo
SERVICE nginx restart 2>&1 | tee -a ${FOLDER}/cert-renewal.lastrun
echo -e "${idsCL[LightGreen]}The certificates have been renewed.${idsCL[Default]}"
echo ""
echo
if [ -z $action ] || [ "${action}" = "gui" ]; then
DIVIDER true
ENTER2CONTINUE
@@ -266,7 +266,7 @@ LISTCERTS(){
DIVIDER true
ENTER2CONTINUE
fi
echo ""
echo
}
LISTCERTS_NPM(){
@@ -341,7 +341,7 @@ LISTCERTS_NPM(){
DIVIDER true
ENTER2CONTINUE
fi
echo ""
echo
}
COPYCERTS_NPM(){
ssldir='/opt/nginx-proxy/ssl'

View File

@@ -8,7 +8,7 @@ DELSITE(){
-list) DELSITES; exit 0;;
-*)
echo "Invalid option: '${1}' requires an argument" 1>&2
echo ""
echo
echo -e "Usage: ${idsCL[Yellow]}nodemgmt delsite${idsCL[Default]} {"
width=33
printf "%-${width}s- %s\n" " -site {FQDN address}" "(*required)"
@@ -22,7 +22,7 @@ DELSITE(){
if [ -z ${DEL_SITE+x} ]; then
echo -e -n "${idsCL[LightCyan]}Delete what site address: ${idsCL[Default]}"
read DEL_SITE
echo ""
echo
fi
if [[ $DEL_SSL =~ ^[Nn]$ ]]; then
DEL_SSL=no
@@ -39,7 +39,7 @@ DELSITE(){
fi
if [ ! -z ${DEL_SITE+x} ] && [ "${DEL_SITE}" != "" ]; then
echo -e "${idsCL[LightRed]}Deleting site '${idsCL[Red]}${DEL_SITE^^}${idsCL[LightRed]}'...${idsCL[Default]}"
echo ""
echo
echo -e "${idsCL[LightRed]}[[Removing Files and Folders]]${idsCL[Default]}"
echo -e "${idsCL[LightRed]}-------------------------------------------${idsCL[Default]}"
@@ -90,12 +90,12 @@ DELSITE(){
# fi
# nid=`expr $nid + 1`
# done
# echo ""
# echo
# SERVICE nginx reload ns
echo -e "${idsCL[LightRed]}Site has been deleted.${idsCL[Default]}"
else
echo "Missing arguments"
echo ""
echo
echo -e "Usage: ${idsCL[Yellow]}nodemgmt delsite${idsCL[Default]} {"
width=33
printf "%-${width}s- %s\n" " -site {FQDN address}" "Site to delete"
@@ -125,15 +125,15 @@ DELSITES(){
for s in "${!SITES[@]}"; do
echo " [${s}] ${SITES[${s}]}"
done
echo ""
echo
if [ -z $action ] || [ "${action}" = "gui" ]; then
echo " [B] Back"
fi
echo " [Q] Quit"
echo ""
echo
echo -e -n "${idsCL[LightYellow]}Please select a site from above from above:${idsCL[Default]} "
read selsite
echo ""
echo
if [ -z ${SITES[$selsite]} ] && [ "${selsite}" != "Q" ] && [ "${selsite}" != "q" ] && [ "${selsite}" != "B" ] && [ "${selsite}" != "b" ]; then
echo "Thats an invaild option,"
echo "please select a valid option only."
@@ -149,12 +149,12 @@ DELSITES(){
do
echo -e -n "${idsCL[LightRed]}Are you sure you want to delete '${idsCL[Red]}${SITES[${selsite}]^^}${idsCL[LightRed]}'? [y/N]${idsCL[Default]} "
read response
echo ""
echo
if [[ $response =~ ^[Yy]$ ]]; then
echo -e -n "${idsCL[LightRed]}Do you also want to delete the certs for '${idsCL[Red]}${SITES[${selsite}]^^}${idsCL[LightRed]}', if they exist? [y/N]${idsCL[Default]} "
read sslresponse
DELSITE -site ${SITES[${selsite}]} -ssl ${sslresponse}
echo ""
echo
DIVIDER
ENTER2CONTINUE
break
@@ -185,7 +185,7 @@ NEWSITE(){
-exploits) EXPLOITS=${2};;
-secure) SECURE=${2};;
-h | -help | --help)
echo ""
echo
echo -e "Usage: ${idsCL[Yellow]}nodemgmt newcert${idsCL[Default]} {"
width=33
printf "%-${width}s- %s\n" " -site {FQDN address(,es)}" "(new site and aliases, comma separated)"
@@ -329,7 +329,7 @@ NEWSITE(){
fi
if [ "${GO}" = "true" ]; then
echo -e "${idsCL[LightGreen]}Setting up new site for '${idsCL[Yellow]}${MAIN_SITE}${idsCL[LightGreen]}' {${NGINX_SERVERNAME}}...${idsCL[Default]}"
echo ""
echo
[ "${WEBSOCKET}" == "yes" ] && WEBSOCKET="include conf.d\/include\/websocket-support.conf;" || WEBSOCKET=""
[ "${HSTS}" == "yes" ] && HSTS="include conf.d\/include\/hsts-support.conf;" || HSTS=""

View File

@@ -678,7 +678,7 @@ STATUS(){
########################
########################
if [ "${ST_ACTION}" != "check" ]; then
echo ""
echo
if [ -z $action ] || [ "${action}" = "gui" ]; then
DIVIDER true
ENTER2CONTINUE