| 
														
															@@ -71,8 +71,14 @@ comprobarRoot() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 comprobarDependencias() { 
														 | 
														
														 | 
														
															 comprobarDependencias() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	if [ ! -x $(which whiptail) ];then 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		printf "ERROR:\twhiptail no disponible.\n" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	which whiptail > /dev/null 2>&1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if [ $? -ne 0 ];then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		printf "ERROR:\t'whiptail' no disponible.\n" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		exit 1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	which hostnamectl > /dev/null 2>&1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if [ $? -ne 0 ];then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		printf "ERROR:\t'hostnamectl' no disponible.\n" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		exit 1 
														 | 
														
														 | 
														
															 		exit 1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	fi 
														 | 
														
														 | 
														
															 	fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	if [ $debianOS = true ];then 
														 | 
														
														 | 
														
															 	if [ $debianOS = true ];then 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -108,6 +114,18 @@ comprobarDependencias() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	fi 
														 | 
														
														 | 
														
															 	fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+comprobarHostname() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	while [ -z $hostname ]; do 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		hostname=$(whiptail --title "Hostname" --inputbox "El nombre de dominio de este servidor es:\n"$(hostname)"\n\nQuieres cambiarlo por otro?" --ok-button "Cambiar" --cancel-button "No Cambiar" 20 70 3>&1 1>&2 2>&3) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		if [ $? -eq 0 ] && [ ! -z $hostname ]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			hostnamectl set-hostname $hostname 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		else 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			hostname=$(hostname) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		fi 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	done 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	#printf "\nHostname: $hostname\n" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 mostrarBienvenida() { 
														 | 
														
														 | 
														
															 mostrarBienvenida() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	if [ $debianOS = false ] && [ $rhelOS = false ]; then 
														 | 
														
														 | 
														
															 	if [ $debianOS = false ] && [ $rhelOS = false ]; then 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		whiptail --title "ERROR OS NO SOPORTADO" --msgbox "Este script automatiza la creación de una web MediaWiki SOLO para distribuciones Linux de la familia Debian (Ubuntu, Linux Mint, ...) y de la familia Red-Hat (CentOS, Fedora, ...).\n\nInformación del sistema:\nOS: $OS $DIST $REV\n$HDInfo" --ok-button "Salir" 20 70 
														 | 
														
														 | 
														
															 		whiptail --title "ERROR OS NO SOPORTADO" --msgbox "Este script automatiza la creación de una web MediaWiki SOLO para distribuciones Linux de la familia Debian (Ubuntu, Linux Mint, ...) y de la familia Red-Hat (CentOS, Fedora, ...).\n\nInformación del sistema:\nOS: $OS $DIST $REV\n$HDInfo" --ok-button "Salir" 20 70 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -165,11 +183,12 @@ mostrarComponentes() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 instalarWebServer() { 
														 | 
														
														 | 
														
															 instalarWebServer() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	webServer=$(whiptail --title "Servidor Web" --radiolist "" 20 70 2 \ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	webServer=$(whiptail --title "Servidor Web" --radiolist "<ESPACIO>: seleccionar   <TAB>: cambiar   <FLECHAS>: moverse\n\nEscoge el servidor web que quieres usar:" 20 70 2 \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	"Apache" "Instalar el servidor web Apache2" ON \ 
														 | 
														
														 | 
														
															 	"Apache" "Instalar el servidor web Apache2" ON \ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	"Nginx" "Instalar el servidor web Nginx" OFF \ 
														 | 
														
														 | 
														
															 	"Nginx" "Instalar el servidor web Nginx" 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) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	# Preguntar otras opciones de configuración 
														 | 
														
														 | 
														
															 	# Preguntar otras opciones de configuración 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	comprobarHostname 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	case $webServer in 
														 | 
														
														 | 
														
															 	case $webServer in 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		Apache) 
														 | 
														
														 | 
														
															 		Apache) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			printf " Apache..." 
														 | 
														
														 | 
														
															 			printf " Apache..." 
														 |