From b2928ec917b8d9af68a40cb5e0cec4aa9ec6e53a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 13 Nov 2023 19:49:38 -0600 Subject: [PATCH] update --- defaults.inc | 2 +- inc/certs.inc | 2 -- inc/sites.inc | 30 ++++++++++++++++++++++++------ 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/defaults.inc b/defaults.inc index 668d2ef6..abc4cc1c 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,5 +1,5 @@ #!/usr/bin/env bash -VERS='4.13.29-11132023' +VERS='4.13.30-11132023' noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update ' CERT_DAEMON='/snap/bin/certbot' diff --git a/inc/certs.inc b/inc/certs.inc index a910eb71..4148661b 100755 --- a/inc/certs.inc +++ b/inc/certs.inc @@ -362,8 +362,6 @@ LISTCERTS(){ *) [ "${delconfirm}" !="" ] echo ;; esac echo -e "\033[5A"; for (( c=1; c<=5; c++ )); do echo -e "\033[K"; done; echo -e "\033[5A" - [ "${SEARCH}" != "0" ] && LISTCERTS -edit -search ${SEARCH} || LISTCERTS -edit - exit 0 ;; [Ee]) echo -e "\033[K" diff --git a/inc/sites.inc b/inc/sites.inc index ff661509..a13afc08 100755 --- a/inc/sites.inc +++ b/inc/sites.inc @@ -837,7 +837,7 @@ SITEINFO(){ echo -e "\033[K" echo -e "\033[K" echo -e "\033[K" - echo -e "\033[K (${idsCL[Green]}S${idsCL[Default]})ave, (${idsCL[Yellow]}C${idsCL[Default]})ancel, (${idsCL[Yellow]}E${idsCL[Default]})xit" + echo -e "\033[K (${idsCL[Green]}S${idsCL[Default]})ave Site, (${idsCL[Red]}D${idsCL[Default]})elete Site, (${idsCL[Yellow]}C${idsCL[Default]})ancel, (${idsCL[Yellow]}E${idsCL[Default]})xit" echo -e "\033[K" echo -e "\033[K" echo -e "\033[7A" @@ -876,16 +876,34 @@ SITEINFO(){ read -i "${port}" -e port echo -e "\033[5A"; for (( c=1; c<=5; c++ )); do echo -e "\033[K"; done; echo -e "\033[5A" ;; - - [Ee]) - echo -e "\033[K" - exit 0 - ;; + [Cc]) echo -e "\r\033[K\n\r\033[K\n\r\033[K" echo -e "\033[16A"; for (( c=1; c<=16; c++ )); do echo -e "\r\033[K"; done; echo -e "\033[16A" echo -e "\n\n\n\n\n\n\n\n" ;; + [Dd]) + echo -e "\033[K\n\033[K" + echo -en "\033[K${idsCL[LightCyan]}Are you sure you wish to delete the site and associated SSL if applicable (y/N): ${idsCL[Default]}" + read -n 1 delconfirm + case "${delconfirm}" in + [Yy]) + echo -en "\n\n${idsCL[LightCyan]}Removing site ... " + # DELSITE -site ${site} -ssl yes >/dev/null 2>&1 + echo -e "${idsCL[LightGreen]}Done\n${idsCL[Default]}" + [ "${SEARCH}" != "0" ] && SITEINFO -edit -search ${SEARCH} || SITEINFO -edit + exit 0 + ;; + *) [ "${delconfirm}" != "" ] echo ;; + esac + echo -e "\033[5A"; for (( c=1; c<=5; c++ )); do echo -e "\033[K"; done; echo -e "\033[5A" + + ;; + [Ee]) + echo -e "\033[K" + exit 0 + ;; + *) ;; esac [ "${editc}" == "" ] && echo -e "\033[13A" || echo -e "\033[12A"