| 
					
				 | 
			
			
				@@ -71,23 +71,26 @@ comprobarRoot() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 comprobarDependencias() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	# Comprobamos whiptail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	which whiptail > /dev/null 2>&1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	if [ $? -ne 0 ];then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		printf "ERROR:\t'whiptail' no disponible.\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	# Comprobamos hostnamectl 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	which hostnamectl > /dev/null 2>&1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	if [ $? -ne 0 ];then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		printf "ERROR:\t'hostnamectl' no disponible.\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	if [ $debianOS = true ];then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		# Comprobamos apt-get 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		which apt-get > /dev/null 2>&1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if [ $? -ne 0 ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			printf "ERROR:\t'apt-get' no está disponible.\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		#Actualizamos base de datos del repositorio 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		# Actualizamos base de datos del repositorio 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		printf "Actualizando repositorio APT..." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		result=$(apt-get -q -y update) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if [ $? -ne 0 ]; then 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -96,13 +99,21 @@ comprobarDependencias() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		printf " OK.\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		# Comprobamos Firewall (ufw) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		which ufw > /dev/null 2>&1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if [ $? -ne 0 ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			printf "ERROR:\t'ufw' no disponible.\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	if [ $rhelOS = true ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		# Comprobamos yum 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		which yum > /dev/null 2>&1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if [ $? -ne 0 ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			printf "ERROR:\t'yum' no está disponible.\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		# Actualizamos base de datos del repositorio 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		printf "Actualizando repositorio YUM..." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		result=$(yum -y makecache 2>&1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if [ $? -ne 0 ]; then 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -111,6 +122,12 @@ comprobarDependencias() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		printf " OK.\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		# Comprobamos Firewall (firewall-cmd) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		which firewall-cmd > /dev/null 2>&1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if [ $? -ne 0 ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			printf "ERROR:\t'firewall-cmd' no disponible.\n" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -349,7 +366,7 @@ mostrarBienvenida 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # Selección de componentes 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 mostrarComponentes 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # Pre-configuración 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	# Habilitar cortafuegos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	# Habilitar cortafuegos -> PROBLEMA: se corta la conexión ssh 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # Instalación 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	# Cuando funcionen todos los instaladores, cambiarlo por variables de estado e instalar en este punto 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	# whiptail --gauge 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -361,13 +378,13 @@ mostrarComponentes 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	# Configuración PHP 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		# cgi.fix_pathinfo=0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		# Configurar máximo de subida de archivos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	# Configuración MediWiki 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	# Configuración Moodle 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	# Arrancar y habilitar todos los servicios (SystemD, Service o SystemV) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	# Añadir reglas del cortafuegos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	# Configuración SSL/TLS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		# Generar certificados 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		# Configurar certificados 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	# Configuración MediWiki 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	# Configuración Moodle 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # Autodestrucción 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 |