Explorar el Código

* Cambios en configurarSELinux()

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

+ 6 - 5
install

@@ -1788,13 +1788,17 @@ crearDBMoodle() {
 }
 
 configurarSELinux() {
-# Configurar SELinux (Sólo para RHEL)
+# Configurar SELinux
 	which semanage >/dev/null 2>&1
 	if [ $? -ne 0 ];then
 		case $ID in
 			centos)
 				result=$(yum -y install policycoreutils-python 2>&1)
 				comprobarError $? 605 $result
+				semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/moodledata(/.*)?" > /dev/null 2>&1
+				comprobarError $? 604
+				restorecon -R /var/www/ > /dev/null 2>&1
+				comprobarError $? 604
 				;;
 			fedora)
 				result=$(yum -y install policycoreutils-python-utils 2>&1)
@@ -1805,10 +1809,7 @@ configurarSELinux() {
 				;;
 		esac
 	fi
-	semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/moodledata(/.*)?" > /dev/null 2>&1
-	comprobarError $? 604
-	restorecon -R /var/www/ > /dev/null 2>&1
-	comprobarError $? 604
+	
 }
 
 instalarPHPInfo() {