Explorar el Código

* Bug: en configurarApache() error con el cut al procesar webServerUser y webServerGroup

Guzmán Castanedo Villalba hace 6 años
padre
commit
7ec3ff5d57
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. 5 5
      install

+ 5 - 5
install

@@ -496,8 +496,8 @@ configurarApache() {
 		fi
 		cp -f $apacheConfFile /etc/$webServerName/apache2.conf 2>/dev/null
 		comprobarError $? 108
-		webServerUser=$(grep ^User /etc/$webServerName/apache2.conf | cut -d '' -f 2)
-		webServerGroup=$(grep ^Group /etc/$webServerName/apache2.conf | cut -d '' -f 2)
+		webServerUser=$(grep ^User /etc/$webServerName/apache2.conf | cut -d ' ' -f 2)
+		webServerGroup=$(grep ^Group /etc/$webServerName/apache2.conf | cut -d ' ' -f 2)
 	elif [ $rhelOS = true ];then
 		apacheConfFile="./etc/$webServerName-rhel/conf/httpd.conf"
 		welcomeConfFile="/etc/$webServerName/conf.d/welcome.conf"
@@ -510,8 +510,8 @@ configurarApache() {
 			sed -i -e 's/^/#/' $welcomeConfFile
 			comprobarError $? 108
 		fi
-		webServerUser=$(grep ^User /etc/$webServerName/conf/httpd.conf | cut -d '' -f 2)
-		webServerGroup=$(grep ^Group /etc/$webServerName/conf/httpd.conf | cut -d '' -f 2)
+		webServerUser=$(grep ^User /etc/$webServerName/conf/httpd.conf | cut -d ' ' -f 2)
+		webServerGroup=$(grep ^Group /etc/$webServerName/conf/httpd.conf | cut -d ' ' -f 2)
 		unset apacheConfFile welcomeConfFile
 	fi
 	if [ ! -d "/etc/$webServerName/sites-available" ];then
@@ -1180,7 +1180,7 @@ mostrarExpress
 		if [ $? -eq 0 ];then
 			echo -en " OK.\n" | tee -a $logFile
 		else
-			echo -en " Ya se encuentra instalado.\n" | tee -a $logFile
+			echo -en " Ya se encuentra configurado.\n" | tee -a $logFile
 		fi
 	fi
 # Añadir reglas del cortafuegos