Explorar el Código

* Cambios en las cadenas de texto
* Reorganización del código

Guzmán Castanedo Villalba hace 5 años
padre
commit
b79dc27336
Se han modificado 1 ficheros con 122 adiciones y 123 borrados
  1. 122 123
      install

+ 122 - 123
install

@@ -668,13 +668,13 @@ mostrarBienvenida() {
 # Pantalla de bienvenida y muestra SO y estado de los discos
 # Pantalla de bienvenida y muestra SO y estado de los discos
 	ANCHO=$(tput cols)
 	ANCHO=$(tput cols)
 	ALTO=$(tput lines)
 	ALTO=$(tput lines)
-	whiptail --title "INSTALACION MEDIAWIKI" --yesno "Este script automatiza completamente la instalación de una WIKI y un CAMPUS VIRTUAL.\nPara ello instala un servidor LAMP, el software MediaWiki y configura todo lo necesario.\n\nInformación del sistema:\nOS: $OS $DIST $REV\n$HDInfo" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Continuar" --no-button "Salir"
+	whiptail --title "INSTALACION AUTO-ELEARNING" --yesno "Este script automatiza completamente la instalación de una WIKI y un CAMPUS VIRTUAL.\nPara ello instala un servidor LAMP o LEMP, el software MediaWiki y configura todo lo necesario.\n\nInformación del sistema:\nOS: $OS $DIST $REV\n$HDInfo" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Continuar" --no-button "Salir"
 	comprobarError $? 1
 	comprobarError $? 1
 }
 }
 
 
 mostrarExpress() {
 mostrarExpress() {
 # Pantalla de elección entre instalación express o avanzada
 # Pantalla de elección entre instalación express o avanzada
-	express=$(whiptail --title "INSTALACION EXPRESS" --radiolist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nLa instalación express instala Nginx, MariaDB, PHP-7, Let's Encrypt, MediaWiki, Moodle y backups automático.\nSeleccione el tipo de instalación que desee:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 2 \
+	express=$(whiptail --title "INSTALACION EXPRESS" --radiolist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nLa instalación express instala Nginx, MariaDB, PHP-7, Let's Encrypt, MediaWiki, Moodle y backups automáticos.\nSeleccione el tipo de instalación que desee:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 2 \
 	"Express" "Instalación rápida" ON \
 	"Express" "Instalación rápida" ON \
 	"Avanzada" "Permite escoger todas las opciones disponibles" OFF \
 	"Avanzada" "Permite escoger todas las opciones disponibles" OFF \
 	--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
 	--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
@@ -701,7 +701,7 @@ mostrarExpress() {
 
 
 mostrarAvanzada() {
 mostrarAvanzada() {
 # Pantalla que permite instalar un servidor LAMP o LEMP
 # Pantalla que permite instalar un servidor LAMP o LEMP
-	webServer=$(whiptail --title "INSTALACION AVANZADA" --radiolist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nEscoge el tipo de Servidor Web que quieres instalar:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 2 \
+	webServer=$(whiptail --title "INSTALACION AVANZADA" --radiolist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nEscoge el tipo de SERVIDOR WEB a instalar:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 2 \
 	"LEMP" "GNU/Linux + (E)Nginx + MySQL/MariaDB + PHP-7" ON \
 	"LEMP" "GNU/Linux + (E)Nginx + MySQL/MariaDB + PHP-7" ON \
 	"LAMP" "GNU/Linux + Apache + MySQL/MariaDB + PHP-7" OFF \
 	"LAMP" "GNU/Linux + Apache + MySQL/MariaDB + PHP-7" OFF \
 	--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
 	--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
@@ -729,9 +729,118 @@ mostrarAvanzada() {
 	unset webServer
 	unset webServer
 }
 }
 
 
+leerSQLPasswd() {
+# Pantalla para leer la contraseña para el usuario root de SQL
+	control=false
+	error=""
+	# Leemos la contreseña (stdin) y confirmamos
+	while [ $control = false ]; do
+		sqlPasswd=$(whiptail --title "CONTRASEÑA SQL" --passwordbox "$error""Introduzca la CONTRASEÑA para el usuario 'root' de la base de datos:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
+		comprobarError $? 1
+		sqlPasswd2=$(whiptail --title "CONTRASEÑA SQL" --passwordbox "Confirme la CONTRASEÑA:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
+		comprobarError $? 1
+		#echo -en "SQL Password 1: $sqlPasswd\n"
+		#echo -en "SQL Password 2: $sqlPasswd2\n"
+		if [ -z "$sqlPasswd" ] || [ -z "$sqlPasswd2" ]; then
+			error="ERROR: LA CONTRASEÑA NO PUEDE ESTAR VACIA.\n"
+		elif [ $sqlPasswd != $sqlPasswd2 ];then
+			error="ERROR: LAS CONTRASEÑAS NO COINCIDEN.\n"
+		else
+			control=true
+		fi
+	done
+	#echo -en "SQL Password: $sqlPasswd\n"
+	unset control error sqlPasswd2
+}
+
+establecerFQDN() {
+# Configura el FQDN (dominio principal del servidor)
+	while [ -z "$hostname" ]; do
+		hostname=$(whiptail --title "FQDN" --inputbox "El nombre de DOMINIO PRINCIPAL (FQDN) de este servidor es:\n"$(hostname)"\n\n¿Quieres cambiarlo por otro?" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Cambiar" --cancel-button "No Cambiar" 3>&1 1>&2 2>&3)
+		if [ $? -eq 0 ] && [ ! -z "$hostname" ]; then
+			hostnamectl set-hostname $hostname
+		else
+			hostname=$(hostname)
+		fi
+	done
+	echo -en "Hostname: $hostname\n" >> $logFile
+}
+
+mostrarDatabase() {
+# Pantalla que permite escoger entre instalar MariaDB o MySQL
+	case $ID in
+		debian)
+			whiptail --title "BASE DE DATOS" --yesno "Para su distribucion $OS $DIST $REV, sólo está disponible la base de datos MariaDB." $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Continuar" --no-button "Salir"
+			comprobarError $? 1
+			# Excepción: aunque es MariaDB (se instala con el nombre de mysql-server)
+			mySQLOn=true
+			dbType="mariadb"
+			;;
+		ubuntu)
+			case $VERSION in
+				18.04)
+					database=$(whiptail --title "BASE DE DATOS" --radiolist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nEscoge la BASE DE DATOS que quieres usar:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 2 \
+					"MariaDB" "Instalar la base de datos MariaDB (fork de MySQL)" ON \
+					"MySQL" "Instalar la base de datos MySQL (uso no comercial)" OFF \
+					--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
+					comprobarError $? 1
+					case $database in
+						MariaDB)
+							mariaDBOn=true
+							dbType="mariadb"
+							;;
+						MySQL)
+							mySQLOn=true
+							dbType="mysqli"
+							;;
+						*)
+							comprobarError 1 200
+							;;
+					esac
+					;;
+				16.04)
+					# Ubuntu 16.04 presenta un bug en MySQL (así que lo deshabilitamos)
+					whiptail --title "BASE DE DATOS" --yesno "Para su distribucion $OS $DIST $REV, sólo está disponible la base de datos MariaDB." $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Continuar" --no-button "Salir"
+					comprobarError $? 1
+					mariaDBOn=true
+					dbType="mariadb"
+					;;
+			esac
+			;;
+		centos|fedora)
+			whiptail --title "BASE DE DATOS" --yesno "Para su distribucion $OS $DIST $REV, sólo está disponible la base de datos MariaDB." $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Continuar" --no-button "Salir"
+			comprobarError $? 1
+			mariaDBOn=true
+			dbType="mariadb"
+			;;
+		*)
+			comprobarError 1 200
+			;;
+	esac
+	# Otras opciones (contraseña)
+	leerSQLPasswd
+}
+
+establecerMaxUpload() {
+# Pantalla para establecer el máximo de subida al servidor (vía PHP)
+	control=false
+	error=""
+	while [ $control = false ];do
+		maxUpload2=$(whiptail --title "PHP MAX UPLOAD" --inputbox "$error""Introduzca el TAMAÑO MAXIMO permitido de los ficheros subidos al servidor:\n(<K:Kilobyte>   <M:Megabyte>   <G:Gigabyte>)" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) $maxUpload --ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
+		comprobarError $? 1
+		if [ -z "$maxUpload2" ];then
+			error="ERROR: NO PUEDES DEJAR ESTE PARÁMETRO VACIO.\n"
+		else
+			control=true
+		fi
+	done
+	maxUpload=$maxUpload2
+	unset control maxUpload2
+}
+
 mostrarComponentes() {
 mostrarComponentes() {
 # Pantalla de elección de componentes (SSL/TLS, MediaWiki, Moodle, InfoPHP y Backup)
 # Pantalla de elección de componentes (SSL/TLS, MediaWiki, Moodle, InfoPHP y Backup)
-	componentes=$(whiptail --title "INSTALACION AVANZADA" --checklist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nEscoge los componentes que quieres instalar:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 5 \
+	componentes=$(whiptail --title "INSTALACION AVANZADA" --checklist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nEscoja los componentes a instalar:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 5 \
 	"SSL/TLS" "Instalar certificados para activar HTTPS" ON \
 	"SSL/TLS" "Instalar certificados para activar HTTPS" ON \
 	"MediaWiki" "Instalar wiki con MediaWiki" ON \
 	"MediaWiki" "Instalar wiki con MediaWiki" ON \
 	"Moodle" "Instalar campus virtual con Moodle" ON \
 	"Moodle" "Instalar campus virtual con Moodle" ON \
@@ -739,7 +848,6 @@ mostrarComponentes() {
 	"Backup" "Programar backups automáticos" ON \
 	"Backup" "Programar backups automáticos" ON \
 	--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
 	--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
 	comprobarError $? 1
 	comprobarError $? 1
-	# Mejora: autodetección de componentes ya instalados
 	for i in $componentes; do
 	for i in $componentes; do
 		case $i in
 		case $i in
 			\"SSL/TLS\")
 			\"SSL/TLS\")
@@ -770,7 +878,7 @@ mostrarComponentes() {
 
 
 mostrarSSL() {
 mostrarSSL() {
 # Pantalla que permite seleccionar el tipo de certificados
 # Pantalla que permite seleccionar el tipo de certificados
-	ssl=$(whiptail --title "INSTALACION SSL/TLS" --radiolist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nEscoge el tipo de Certificado SSL/TLS que quieres instalar:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 2 \
+	ssl=$(whiptail --title "INSTALACION SSL/TLS" --radiolist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nEscoja el tipo de Certificado SSL/TLS a instalar:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 2 \
 	"LetsEncrypt" "Compatible con todos los navegadores" ON \
 	"LetsEncrypt" "Compatible con todos los navegadores" ON \
 	"Auto-Firmado" "Certificados auto-firmados (sólo para pruebas)" OFF \
 	"Auto-Firmado" "Certificados auto-firmados (sólo para pruebas)" OFF \
 	--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
 	--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
@@ -796,12 +904,12 @@ mostrarMediaWiki(){
 # Pantalla que pregunta sobre las opciones necesarias para configurar MediaWiki
 # Pantalla que pregunta sobre las opciones necesarias para configurar MediaWiki
 	# Introducir nombre wiki
 	# Introducir nombre wiki
 	while [ -z "$nombreMediaWiki" ]; do
 	while [ -z "$nombreMediaWiki" ]; do
-		nombreMediaWiki=$(whiptail --title "CONFIGURACION MEDIAWIKI" --inputbox "Introduzca el nombre de la Wiki:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
+		nombreMediaWiki=$(whiptail --title "CONFIGURACION MEDIAWIKI" --inputbox "Introduzca el NOMBRE de la Wiki:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
 		comprobarError $? 1
 		comprobarError $? 1
 	done
 	done
 	# Introducir dominio
 	# Introducir dominio
 	while [ -z "$dominioMediaWiki" ]; do
 	while [ -z "$dominioMediaWiki" ]; do
-		dominioMediaWiki=$(whiptail --title "CONFIGURACION MEDIAWIKI" --inputbox "Introduzca el dominio/subdominio de la Wiki.\nTenga en cuenta que debes apuntar este dominio a la dirección IP de esta máquina mediante un registro DNS de tipo CNAME.\nSi quiere introducir varios dominios sepárelos con espacios. El primero será el principal.\nPor ejemplo: 'www.$hostname $hostname wiki.$hostname'" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) wiki.$hostname --ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
+		dominioMediaWiki=$(whiptail --title "CONFIGURACION MEDIAWIKI" --inputbox "Introduzca el DONIMIO/SUBDOMINIO de la Wiki.\nTenga en cuenta que el dominio debe de apuntar a la dirección IP de la máquina mediante un registro DNS.\nSi quiere introducir varios dominios sepárelos con espacios.\nEl primero será el principal.\nPor ejemplo: 'www.$hostname $hostname wiki.$hostname'" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) wiki.$hostname --ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
 		comprobarError $? 1
 		comprobarError $? 1
 	done
 	done
 	cont=1
 	cont=1
@@ -822,9 +930,9 @@ mostrarMediaWiki(){
 	control=false
 	control=false
 	error=""
 	error=""
 	while [ $control = false ]; do
 	while [ $control = false ]; do
-		passwdMediaWiki=$(whiptail --title "CONFIGURACION MEDIAWIKI" --passwordbox "$error""Introduzca la contraseña para el usuario administrador 'admin':" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
+		passwdMediaWiki=$(whiptail --title "CONFIGURACION MEDIAWIKI" --passwordbox "$error""Introduzca la CONTRASEÑA para el usuario administrador 'admin':" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
 		comprobarError $? 1
 		comprobarError $? 1
-		passwdMediaWiki2=$(whiptail --title "CONFIGURACION MEDIAWIKI" --passwordbox "Confirme la contraseña:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
+		passwdMediaWiki2=$(whiptail --title "CONFIGURACION MEDIAWIKI" --passwordbox "Confirme la CONTRASEÑA:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
 		comprobarError $? 1
 		comprobarError $? 1
 		if [ -z "$passwdMediaWiki" ] || [ -z "$passwdMediaWiki2" ]; then
 		if [ -z "$passwdMediaWiki" ] || [ -z "$passwdMediaWiki2" ]; then
 			error="ERROR: LA CONTRASEÑA NO PUEDE ESTAR VACIA.\n"
 			error="ERROR: LA CONTRASEÑA NO PUEDE ESTAR VACIA.\n"
@@ -852,7 +960,7 @@ mostrarMoodle() {
 	nombreCortoMoodle=$(echo $nombreCortoMoodle | cut -d ' ' -f 1)
 	nombreCortoMoodle=$(echo $nombreCortoMoodle | cut -d ' ' -f 1)
 	# Introducir dominio
 	# Introducir dominio
 	while [ -z "$dominioMoodle" ]; do
 	while [ -z "$dominioMoodle" ]; do
-		dominioMoodle=$(whiptail --title "CONFIGURACION MOODLE" --inputbox "Introduzca el dominio/subdominio del campus virtual.\nMoodle SÓLO permite un ÚNICO DOMINIO." $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) moodle.$hostname --ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
+		dominioMoodle=$(whiptail --title "CONFIGURACION MOODLE" --inputbox "Introduzca el DOMINIO/SUBDOMINIO del campus virtual.\nTenga en cuenta que el dominio debe de apuntar a la dirección IP de la máquina mediante un registro DNS.\nMoodle SÓLO permite un ÚNICO DOMINIO." $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) moodle.$hostname --ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
 		comprobarError $? 1
 		comprobarError $? 1
 	done
 	done
 	cont=1
 	cont=1
@@ -873,9 +981,9 @@ mostrarMoodle() {
 	control=false
 	control=false
 	error=""
 	error=""
 	while [ $control = false ]; do
 	while [ $control = false ]; do
-		passwdMoodle=$(whiptail --title "CONFIGURACION MOODLE" --passwordbox "$error""Introduzca la contraseña para el usuario administrador 'admin':" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
+		passwdMoodle=$(whiptail --title "CONFIGURACION MOODLE" --passwordbox "$error""Introduzca la CONTRASEÑA para el usuario administrador 'admin':" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
 		comprobarError $? 1
 		comprobarError $? 1
-		passwdMoodle2=$(whiptail --title "CONFIGURACION MOODLE" --passwordbox "Confirme la contraseña:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
+		passwdMoodle2=$(whiptail --title "CONFIGURACION MOODLE" --passwordbox "Confirme la CONTRASEÑA:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
 		comprobarError $? 1
 		comprobarError $? 1
 		if [ -z "$passwdMoodle" ] || [ -z "$passwdMoodle2" ]; then
 		if [ -z "$passwdMoodle" ] || [ -z "$passwdMoodle2" ]; then
 			error="ERROR: LA CONTRASEÑA NO PUEDE ESTAR VACIA.\n"
 			error="ERROR: LA CONTRASEÑA NO PUEDE ESTAR VACIA.\n"
@@ -890,23 +998,10 @@ mostrarMoodle() {
 
 
 mostrarConfirmacion() {
 mostrarConfirmacion() {
 # Pantalla que presenta una confirmación antes de realizar la instalación
 # Pantalla que presenta una confirmación antes de realizar la instalación
-	whiptail --title "INSTALACION" --yesno "ESTA TODO LISTO PARA LA INSTALACION.\nNO SE OLVIDE DE GUARDAR LAS CONFIGURACIONES EN UN LUGAR SEGURO, YA QUE SERÁN IMPORTANTES POR SI DESEA HACER ALGÚN CAMBIO EN EL FUTURO.\n¿DESEA CONTINUAR?" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Instalar" --no-button "Salir"
+	whiptail --title "INSTALACION" --yesno "ESTA TODO LISTO PARA LA INSTALACION.\nNO SE OLVIDE DE GUARDAR LAS CONFIGURACIONES EN UN LUGAR SEGURO, YA QUE SERÁN IMPORTANTES POR SI DESEA REALIZAR ALGÚN CAMBIO EN EL FUTURO.\n¿DESEA CONTINUAR?" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Instalar" --no-button "Salir"
 	comprobarError $? 1
 	comprobarError $? 1
 }
 }
 
 
-establecerFQDN() {
-# Configura el FQDN (dominio principal del servidor)
-	while [ -z "$hostname" ]; do
-		hostname=$(whiptail --title "FQDN" --inputbox "El nombre de dominio principal (FQDN) de este servidor es:\n"$(hostname)"\n\n¿Quieres cambiarlo por otro?" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Cambiar" --cancel-button "No Cambiar" 3>&1 1>&2 2>&3)
-		if [ $? -eq 0 ] && [ ! -z "$hostname" ]; then
-			hostnamectl set-hostname $hostname
-		else
-			hostname=$(hostname)
-		fi
-	done
-	echo -en "Hostname: $hostname\n" >> $logFile
-}
-
 instalarApache() {
 instalarApache() {
 # Instala Apache2
 # Instala Apache2
 	case $ID in
 	case $ID in
@@ -1144,85 +1239,6 @@ instalarVirtualHost() {
 	unset rootVirtualHost dominioVirtualHost virtualHostFile virtualHostName aliasVirtualHost socket
 	unset rootVirtualHost dominioVirtualHost virtualHostFile virtualHostName aliasVirtualHost socket
 }
 }
 
 
-mostrarDatabase() {
-# Pantalla que permite escoger entre instalar MariaDB o MySQL
-	case $ID in
-		debian)
-			whiptail --title "BASE DE DATOS" --yesno "Para su distribucion $OS $DIST $REV, sólo está disponible la base de datos MariaDB." $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Continuar" --no-button "Salir"
-			comprobarError $? 1
-			# Excepción: aunque es MariaDB (se instala con el nombre de mysql-server)
-			mySQLOn=true
-			dbType="mariadb"
-			;;
-		ubuntu)
-			case $VERSION in
-				18.04)
-					database=$(whiptail --title "BASE DE DATOS" --radiolist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nEscoge la base de datos que quieres usar:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 2 \
-					"MariaDB" "Instalar la base de datos MariaDB (fork de MySQL)" ON \
-					"MySQL" "Instalar la base de datos MySQL (uso no comercial)" OFF \
-					--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
-					comprobarError $? 1
-					case $database in
-						MariaDB)
-							mariaDBOn=true
-							dbType="mariadb"
-							;;
-						MySQL)
-							mySQLOn=true
-							dbType="mysqli"
-							;;
-						*)
-							comprobarError 1 200
-							;;
-					esac
-					;;
-				16.04)
-					# Ubuntu 16.04 presenta un bug en MySQL (así que lo deshabilitamos)
-					whiptail --title "BASE DE DATOS" --yesno "Para su distribucion $OS $DIST $REV, sólo está disponible la base de datos MariaDB." $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Continuar" --no-button "Salir"
-					comprobarError $? 1
-					mariaDBOn=true
-					dbType="mariadb"
-					;;
-			esac
-			;;
-		centos|fedora)
-			whiptail --title "BASE DE DATOS" --yesno "Para su distribucion $OS $DIST $REV, sólo está disponible la base de datos MariaDB." $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --yes-button "Continuar" --no-button "Salir"
-			comprobarError $? 1
-			mariaDBOn=true
-			dbType="mariadb"
-			;;
-		*)
-			comprobarError 1 200
-			;;
-	esac
-	# Otras opciones (contraseña)
-	leerSQLPasswd
-}
-
-leerSQLPasswd() {
-# Pantalla para leer la contraseña para el usuario root de SQL
-	control=false
-	error=""
-	# Leemos la contreseña (stdin) y confirmamos
-	while [ $control = false ]; do
-		sqlPasswd=$(whiptail --title "CONTRASEÑA SQL" --passwordbox "$error""Introduzca la contraseña para el usuario 'root' de la base de datos:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
-		comprobarError $? 1
-		sqlPasswd2=$(whiptail --title "CONTRASEÑA SQL" --passwordbox "Confirme la contraseña:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) --ok-button "Continuar" --nocancel 3>&1 1>&2 2>&3)
-		comprobarError $? 1
-		#echo -en "SQL Password 1: $sqlPasswd\n"
-		#echo -en "SQL Password 2: $sqlPasswd2\n"
-		if [ -z "$sqlPasswd" ] || [ -z "$sqlPasswd2" ]; then
-			error="ERROR: LA CONTRASEÑA NO PUEDE ESTAR VACIA.\n"
-		elif [ $sqlPasswd != $sqlPasswd2 ];then
-			error="ERROR: LAS CONTRASEÑAS NO COINCIDEN.\n"
-		else
-			control=true
-		fi
-	done
-	#echo -en "SQL Password: $sqlPasswd\n"
-	unset control error sqlPasswd2
-}
-
 establecerSQLPasswd() {
 establecerSQLPasswd() {
 # Establecemos SQL root passwd y securizamos BD (mysql_secure_installation)
 # Establecemos SQL root passwd y securizamos BD (mysql_secure_installation)
 	# Comprobamos si ya tiene una contraseña asignada
 	# Comprobamos si ya tiene una contraseña asignada
@@ -1487,23 +1503,6 @@ configurarPHP() {
 	unset phpConfFile phpDest
 	unset phpConfFile phpDest
 }
 }
 
 
-establecerMaxUpload() {
-# Pantalla para establecer el máximo de subida al servidor (vía PHP)
-	control=false
-	error=""
-	while [ $control = false ];do
-		maxUpload2=$(whiptail --title "PHP MAX UPLOAD" --inputbox "$error""Introduzca el tamaño máximo permitido de los ficheros subidos al servidor:\n(<K:Kilobyte>   <M:Megabyte>   <G:Gigabyte>)" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) $maxUpload --ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
-		comprobarError $? 1
-		if [ -z "$maxUpload2" ];then
-			error="ERROR: NO PUEDES DEJAR ESTE PARÁMETRO VACIO.\n"
-		else
-			control=true
-		fi
-	done
-	maxUpload=$maxUpload2
-	unset control maxUpload2
-}
-
 instalarLetsEncrypt() {
 instalarLetsEncrypt() {
 # Instala certbot (para certificados Let's Encrypt)
 # Instala certbot (para certificados Let's Encrypt)
 	# Comprobamos si cerbot está instalado
 	# Comprobamos si cerbot está instalado