Explorar el Código

* Bug: en instalarPHP() es necesario comprobar si REMI's Repository está instalado

Guzmán Castanedo Villalba hace 6 años
padre
commit
f8d57e5f25
Se han modificado 1 ficheros con 17 adiciones y 15 borrados
  1. 17 15
      install

+ 17 - 15
install

@@ -605,23 +605,25 @@ instalarPHP() {
 		fi
 	elif [ $rhelOS = true ];then
 		# Necesitamos un repositorio adicional para PHP-7 (EPEL-RELEASE)
-		result=$(yum -y install epel-release yum-utils)
+		result=$(yum -y install epel-release yum-utils 2>&1)
 		comprobarError $? 103 $result
 		# Necesitamos un repositorio adicional para PHP-7 (REMI-RELEASE)
-		if [ $VERSION = "7" ];then
-			result=$(yum -y install http://remi.mirrors.cu.be/enterprise/remi-release-7.rpm 2>&1)
-			comprobarError $? 303 $result
-		elif [ $VERSION = "6" ];then
-			result=$(yum -y install http://remi.mirrors.cu.be/enterprise/remi-release-6.rpm 2>&1)
-			comprobarError $? 303 $result
-		elif [ $VERSION = "28" ];then
-			result=$(yum -y install http://remi.mirrors.cu.be/fedora/remi-release-28.rpm 2>&1)
-			comprobarError $? 303 $result
-		elif [ $VERSION = "27" ];then
-			result=$(yum -y install http://remi.mirrors.cu.be/fedora/remi-release-27.rpm 2>&1)
-			comprobarError $? 303 $result
-		else
-			comprobarError 1 304
+		if [ ! -f /etc/yum.repos.d/remi-php72.repo ];then
+			if [ $VERSION = "7" ];then
+				result=$(yum -y install http://remi.mirrors.cu.be/enterprise/remi-release-7.rpm 2>&1)
+				comprobarError $? 303 $result
+			elif [ $VERSION = "6" ];then
+				result=$(yum -y install http://remi.mirrors.cu.be/enterprise/remi-release-6.rpm 2>&1)
+				comprobarError $? 303 $result
+			elif [ $VERSION = "28" ];then
+				result=$(yum -y install http://remi.mirrors.cu.be/fedora/remi-release-28.rpm 2>&1)
+				comprobarError $? 303 $result
+			elif [ $VERSION = "27" ];then
+				result=$(yum -y install http://remi.mirrors.cu.be/fedora/remi-release-27.rpm 2>&1)
+				comprobarError $? 303 $result
+			else
+				comprobarError 1 304
+			fi
 		fi
 		# Activamos repositorio remi-php72
 		result=$(yum-config-manager --enable remi-php72 2>&1)