Update 'installer.sh'

This commit is contained in:
b.waal
2019-11-07 14:26:10 +01:00
parent 1d7978b83d
commit bd6b80b206

View File

@@ -36,12 +36,12 @@ $PKGI curl > $OUTPUT 2>&1
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)
password=$(whiptail --nocancel --passwordbox "Please enter your password (should contain at least 2 digits and 6 characters)" 11 82 --title "Config" 3>&1 1>&2 2>&3) password=$(whiptail --nocancel --passwordbox "Please enter your password (should contain at least 2 digits and 6 characters)" 11 82 --title "Config" 3>&1 1>&2 2>&3)
email=$(whiptail --nocancel --inputbox " Enter the administrator e-mail" 11 82 --title "Config" 3>&1 1>&2 2>&3) email=$(whiptail --nocancel --inputbox " Enter the administrator e-mail" 11 82 --title "Config" 3>&1 1>&2 2>&3)
cweb=$(whiptail --title "Select Webserver" --radiolist "WebServer" 11 128 5 "Nginx" "Will install NGINX Webserver" ON "Apache" "Will install Apache Webserver" OFF 3>&1 1>&2 2>&3) webserv=$(whiptail --title "Select Webserver" --radiolist "WebServer" 11 53 5 "Nginx:" "Will install NGINX Webserver." ON "Apache:" "Will install Apache Webserver." OFF 3>&1 1>&2 2>&3)
if [[ $cweb == "Nginx" ]]; then if [[ $webserv == "Nginx" ]]; then
echo "nginx php${phpver}-fpm php${phpver}-imagick php${phpver}-mysql php${phpver}-cgi php${phpver}-common php${phpver}-pear php${phpver}-mbstring php${phpver}-curl php${phpver}-gd php${phpver}-intl php${phpver}-soap php${phpver}-xml php${phpver}-xmlrpc php${phpver}-zip" >> /tmp/install.txt echo "nginx php${phpver}-fpm php${phpver}-imagick php${phpver}-mysql php${phpver}-cgi php${phpver}-common php${phpver}-pear php${phpver}-mbstring php${phpver}-curl php${phpver}-gd php${phpver}-intl php${phpver}-soap php${phpver}-xml php${phpver}-xmlrpc php${phpver}-zip" >> /tmp/install.txt
fi fi
if [[ $cweb == "Apache" ]]; then if [[ $webserv == "Apache" ]]; then
echo "apache2 libapache2-mod-php php${phpver}-mysql php${phpver}-cgi php${phpver}-common php${phpver}-pear php${phpver}-mbstring php${phpver}-curl php${phpver}-gd php${phpver}-intl php${phpver}-soap php${phpver}-xml php${phpver}-xmlrpc php${phpver}-zip" >> /tmp/install.txt echo "apache2 libapache2-mod-php php${phpver}-mysql php${phpver}-cgi php${phpver}-common php${phpver}-pear php${phpver}-mbstring php${phpver}-curl php${phpver}-gd php${phpver}-intl php${phpver}-soap php${phpver}-xml php${phpver}-xmlrpc php${phpver}-zip" >> /tmp/install.txt
fi fi
@@ -52,20 +52,19 @@ fi
if [ $webserv = nginx ]; then if [ $webserv = nginx ]; then
#NGINX Addon menu #NGINX Addon menu
option=$(whiptail --nocancel --title "Which addons should be installed?" --checklist "Features" 11 128 5 "Memcached" "Memcached is an open source, high-performance, distributed memory caching system" OFF "Redis Cache" "Redis is an open source BSD licensed, in-memory data structure store" OFF "Brotli Precompression" "Brotli is a data format specification for data streams" OFF 3>&1 1>&2 2>&3) option=$(whiptail --nocancel --title "Which Nginx addons should be installed?" --checklist "Features" 11 110 5 "Memcached:" "Memcached is an open source, high-performance, distributed memory caching system." OFF "Redis Cache:" "Redis is an open source BSD licensed, in-memory data structure store." OFF 3>&1 1>&2 2>&3)
fi fi
if [ $webserv = apache2 ]; then if [ $webserv = apache2 ]; then
#Apache Addon menu #Apache Addon menu
option=$(whiptail --nocancel --title "Which addons should be installed?" --checklist "Features" 11 128 5 "Memcached" "Memcached is an open source, high-performance, distributed memory caching system" OFF "Redis Cache" "Redis is an open source BSD licensed, in-memory data structure store" OFF 3>&1 1>&2 2>&3) option=$(whiptail --nocancel --title "Which Apache addons should be installed?" --checklist "Features" 11 110 5 "Memcached:" "Memcached is an open source, high-performance, distributed memory caching system." OFF "Redis Cache:" "Redis is an open source BSD licensed, in-memory data structure store." OFF 3>&1 1>&2 2>&3)
fi fi
if [[ $option == *"Memcached"* ]]; then if [[ $option == *"Memcached"* ]]; then
curl -s "$repo"/raw/branch/"$branch"/modules/MODNAME/"$webserv"-aptlist >> /tmp/install.txt curl -s "$repo"/raw/branch/"$branch"/modules/MODNAME/"$webserv"-aptlist >> /tmp/install.txt
fi fi
if [[ $option == *"Redis"* ]]; then if [[ $option == *"Redis"* ]]; then
echo "" >> /tmp/install.txt echo "" >> /tmp/install.txt
fi fi
@@ -79,7 +78,7 @@ fi
# CMS # # CMS #
##-------## ##-------##
CMS=$(whiptail --nocancel --title "What CMS should be installed?" --radiolist "Features" 11 128 5 "Nextcloud" "Nextcloud is a suite of client-server software for creating and using file hosting services" OFF "Wordpress" "WordPress is a content management system based on PHP" OFF "None" "A plain webserver will be setup" OFF 3>&1 1>&2 2>&3) CMS=$(whiptail --nocancel --title "What CMS should be installed?" --radiolist "Features" 11 118 5 "Nextcloud:" "Nextcloud is a suite of client-server software for creating and using file hosting services." OFF "Wordpress:" "WordPress is a content management system based on PHP." OFF "None:" "A plain webserver will be setup." OFF 3>&1 1>&2 2>&3)
if [[ $CMS == "Nextcloud" ]]; then if [[ $CMS == "Nextcloud" ]]; then
echo "" >> /tmp/install.txt echo "" >> /tmp/install.txt
@@ -87,7 +86,7 @@ if [[ $CMS == "Wordpress" ]]; then
echo "" >> /tmp/install.txt echo "" >> /tmp/install.txt
fi fi
if [[ $CMS == *"None"* ]]; then if [[ $CMS == "None" ]]; then
echo "" >> /tmp/install.txt echo "" >> /tmp/install.txt
fi fi