code refactoring (#1141)

* code refactoring

* allow decimal numbers (such as 0.1) in addition to integers

* adjust password menu
This commit is contained in:
tteckster 2023-03-09 22:06:56 -05:00 committed by GitHub
parent de020b93af
commit e396345058
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
87 changed files with 15659 additions and 12886 deletions

View file

@ -29,7 +29,7 @@ var_version="9"
NSAPP=$(echo ${APP,,} | tr -d ' ')
var_install="${NSAPP}-v5-install"
timezone=$(cat /etc/timezone)
INTEGER='^[0-9]+$'
INTEGER='^[0-9]+([.][0-9]+)?$'
YW=$(echo "\033[33m")
BL=$(echo "\033[36m")
RD=$(echo "\033[01;31m")
@ -123,6 +123,13 @@ function default_settings() {
VERB="no"
echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}"
}
function exit-script() {
clear
echo -e "⚠ User exited script \n"
exit
}
function advanced_settings() {
CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \
"1" "Unprivileged" ON \
@ -304,6 +311,7 @@ function advanced_settings() {
advanced_settings
fi
}
function install_script() {
ARCH_CHECK
PVE_CHECK