menu and var changes
enabled external menu entry list and made vars reddy for use external of this srcipt
This commit is contained in:
57
installer.sh
57
installer.sh
@@ -53,56 +53,14 @@ domainwww=0
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
##----------------##
|
|
||||||
# Menu Entries #
|
|
||||||
##----------------##
|
|
||||||
|
|
||||||
if [ $IMODE = n ]; then
|
|
||||||
#WebServers
|
|
||||||
webservers=("Nginx:" "Will install NGINX Webserver." ON)
|
|
||||||
webservers+=("Apache:" "Will install Apache Webserver." OFF)
|
|
||||||
|
|
||||||
##Nginx
|
|
||||||
#CMSList
|
|
||||||
NginxCMSL=("None:" "A plain webserver will be setup." OFF)
|
|
||||||
NginxCMSL+=("Wordpress:" "WordPress is a content management system based on PHP." OFF)
|
|
||||||
NginxCMSL+=("Nextcloud:" "Nextcloud is a suite of client-server software for creating and using file hosting services." OFF)
|
|
||||||
#Options
|
|
||||||
NginxOptions=("Option 1:" "Option 1 Desription" OFF)
|
|
||||||
NginxOptions+=("Option 2:" "Option 2 Desription" OFF)
|
|
||||||
NginxOptions+=("Option 3:" "Option 3 Desription" OFF)
|
|
||||||
|
|
||||||
##Apache
|
|
||||||
#CMSList
|
|
||||||
ApacheCMSL=("None:" "A plain webserver will be setup." OFF)
|
|
||||||
ApacheCMSL+=("Wordpress:" "WordPress is a content management system based on PHP." OFF)
|
|
||||||
#Options
|
|
||||||
ApacheOptions=("Option 1:" "Option 1 Desription" OFF)
|
|
||||||
ApacheOptions+=("Option 2: " "Option 2 Desription" OFF)
|
|
||||||
fi
|
|
||||||
if [ $IMODE = l ]; then
|
|
||||||
#WebServers
|
|
||||||
webservers=("Nginx" "Apache" "Quit")
|
|
||||||
##Nginx
|
|
||||||
#CMSList
|
|
||||||
NginxCMSL=("Wordpress" "Nextcloud" "None")
|
|
||||||
#Options
|
|
||||||
NginxOptions=("Ngx Option 1:" "Ngx Option 2:" "Ngx Option 3:")
|
|
||||||
|
|
||||||
|
|
||||||
##Apache
|
|
||||||
#CMSList
|
|
||||||
ApacheCMSL=("Wordpress" "Nextcloud" "None")
|
|
||||||
#Options
|
|
||||||
ApacheOptions=("Apa Option 1:" "Apa Option 2:" "Apa Option 3:")
|
|
||||||
fi
|
|
||||||
|
|
||||||
##---------------------##
|
##---------------------##
|
||||||
# Always-on modules #
|
# Always-on modules #
|
||||||
##---------------------##
|
##---------------------##
|
||||||
|
|
||||||
aonoption="/MySQL/"
|
aonoption="/MySQL/"
|
||||||
aonoption="$aonoption /Unattended-Security-Updates/"
|
aonoption="$aonoption /Unattended-Security-Updates/"
|
||||||
|
|
||||||
|
|
||||||
##---------------##
|
##---------------##
|
||||||
# Functions #
|
# Functions #
|
||||||
##---------------##
|
##---------------##
|
||||||
@@ -144,8 +102,6 @@ if [ -z $passdiatwo ]; then
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function LegacyPasswordQuest {
|
function LegacyPasswordQuest {
|
||||||
echo "Enter password (Requires: 8 chars, 1 capital and 1 num)"
|
echo "Enter password (Requires: 8 chars, 1 capital and 1 num)"
|
||||||
read -s passdiaone
|
read -s passdiaone
|
||||||
@@ -190,6 +146,9 @@ $PKGI curl > $OUTPUT 2>&1
|
|||||||
# Menu #
|
# Menu #
|
||||||
##--------##
|
##--------##
|
||||||
|
|
||||||
|
#Fetching Menu Entries
|
||||||
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/ModulesMenu.list)
|
||||||
|
|
||||||
if [ $IMODE = n ]; then
|
if [ $IMODE = n ]; then
|
||||||
if [ $TestMode = 0 ]; then
|
if [ $TestMode = 0 ]; then
|
||||||
domain=$(whiptail --nocancel --inputbox " Enter the domain without WWW " 11 82 --title "Config" 3>&1 1>&2 2>&3)
|
domain=$(whiptail --nocancel --inputbox " Enter the domain without WWW " 11 82 --title "Config" 3>&1 1>&2 2>&3)
|
||||||
@@ -306,11 +265,14 @@ if [[ ${opts[choice]} ]] # toggle
|
|||||||
then
|
then
|
||||||
opts[choice]=
|
opts[choice]=
|
||||||
topt=${opt//+/}
|
topt=${opt//+/}
|
||||||
|
topt="${topt%"${topt##*[![:space:]]}"}"
|
||||||
|
topt=\"$topt\"
|
||||||
option=${option//"$topt"/}
|
option=${option//"$topt"/}
|
||||||
unset $topt
|
unset $topt
|
||||||
else
|
else
|
||||||
opts[choice]=+
|
opts[choice]=+
|
||||||
option="$option $opt"
|
opt="${opt%"${opt##*[![:space:]]}"}"
|
||||||
|
option+="\"$opt\" "
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
echo "The first slection will always return invalid option, please enter the first option twice"
|
echo "The first slection will always return invalid option, please enter the first option twice"
|
||||||
@@ -337,6 +299,7 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
option="${option%"${option##*[![:space:]]}"}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Cleaning options from menu
|
#Cleaning options from menu
|
||||||
|
|||||||
Reference in New Issue
Block a user