Skip to content

Commit

Permalink
Add the ability to cancel the script on input screens
Browse files Browse the repository at this point in the history
  • Loading branch information
blue-hexagon committed Nov 12, 2022
1 parent 3d36251 commit e91b43c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit e91b43c

Please sign in to comment.