|
@@ -1462,12 +1462,19 @@ configurarMoodle() {
|
|
|
if [ ! -d /var/www/moodledata ];then
|
|
|
mkdir /var/www/moodledata 2>/dev/null
|
|
|
comprobarError $? 602
|
|
|
- #Actualizamos permisos
|
|
|
+ fi
|
|
|
+ #Actualizamos permisos
|
|
|
+ perm=$(stat -c %a /var/www/moodledata)
|
|
|
+ if [ $perm -ne 777 ];then
|
|
|
chmod -R 777 /var/www/moodledata 2>/dev/null
|
|
|
comprobarError $? 602
|
|
|
+ fi
|
|
|
+ perm=$(stat -c %U /var/www/moodledata)
|
|
|
+ if [ $perm != "$webServerUser" ];then
|
|
|
chown -R $webServerUser:$webServerGroup /var/www/moodledata 2>/dev/null
|
|
|
comprobarError $? 602
|
|
|
fi
|
|
|
+ unset perm
|
|
|
# Creamos Base de Datos
|
|
|
nombreDBMo=$(echo $dominioMoodle | sed -e 's/\./_/g')
|
|
|
userDBMo=$(echo $dominioMoodle | sed -e 's/\./_/g')
|
|
@@ -1489,10 +1496,8 @@ configurarMoodle() {
|
|
|
else
|
|
|
comprobarError 1 602
|
|
|
fi
|
|
|
- cd /var/www/$dominioMoodle
|
|
|
- sudo -u $webServerUser php admin/cli/install.php --lang=es --wwwroot="$wwwroot" --dbtype="$dbtype" --dbname="$nombreDBMo" --dbuser="$userDBMo" --dbpass="$sqlPasswd" --fullname="$nombreMoodle" --shortname="$nombreCortoMoodle" --adminuser=admin --adminpass="$passwdMoodle" --adminemail="admin@$dominioMoodle" --agree-license --non-interactive >>$logFile 2>&1
|
|
|
+ php /var/www/$dominioMoodle/admin/cli/install.php --lang=es --wwwroot="$wwwroot" --dbtype="$dbtype" --dbname="$nombreDBMo" --dbuser="$userDBMo" --dbpass="$sqlPasswd" --fullname="$nombreMoodle" --shortname="$nombreCortoMoodle" --adminuser=admin --adminpass="$passwdMoodle" --adminemail="admin@$dominioMoodle" --agree-license --non-interactive >>$logFile 2>&1
|
|
|
comprobarError $? 602
|
|
|
- cd - >/dev/null 2>&1
|
|
|
# Actualizamos permisos
|
|
|
chown -R $webServerUser:$webServerGroup /var/www/$dominioMoodle
|
|
|
# Configuramos VirtualHost
|