From e91b43c0aa67174e301a356cf71f9f89228c7ad7 Mon Sep 17 00:00:00 2001 From: blue-hexagon Date: Sat, 12 Nov 2022 20:33:11 +0100 Subject: [PATCH] Add the ability to cancel the script on input screens --- config.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config.sh b/config.sh index d351850..a72df6f 100644 --- a/config.sh +++ b/config.sh @@ -35,14 +35,13 @@ elif [[ $selection -eq 3 ]]; then print_red "You haven't run the installer yet, exiting" exit 1 fi -else fi dialog --title "DitzelsLAMP" --msgbox 'This script will setup Fail2Ban and install a LAMP server with Wordpress and FTP access. For more information visit: https://github.com/blue-hexagon/BashLamp' 20 70 -form_new_users="$(dialog --inputbox "Enter a list of users to create (space delimited)" 20 70 "" 3>&1 1>&2 2>&3)" -form_ftp_users="$(dialog --inputbox "Add users allowed to ftp into the server (space delimited)" 20 70 "" 3>&1 1>&2 2>&3)" -form_users_password="$(dialog --inputbox "Add a default password for the new users" 20 70 "" 3>&1 1>&2 2>&3)" +form_new_users="$(dialog --inputbox "Enter a list of users to create (space delimited)" 20 70 "" 3>&1 1>&2 2>&3)" || clear && exit +form_ftp_users="$(dialog --inputbox "Add users allowed to ftp into the server (space delimited)" 20 70 "" 3>&1 1>&2 2>&3)" || clear && exit +form_users_password="$(dialog --inputbox "Add a default password for the new users" 20 70 "" 3>&1 1>&2 2>&3)" || clear && exit form_wordpress_db="$(dialog --form "Enter wp database details (no spaces!)" 20 70 14 \ "Wordpress Database Name: " 1 1 "wordpress" 1 35 35 0 \