diff --git a/dd-ctl b/dd-ctl index 16e4f4e..f57f132 100755 --- a/dd-ctl +++ b/dd-ctl @@ -443,12 +443,21 @@ setup_moodle(){ echo " --> Applying custom settings in moodle" # TODO: check why admin/cli/cfg can't be read with -u nobody docker exec -i dd-apps-moodle sh -s <<-EOF + php7 admin/cli/maintenance.php --enable php7 admin/cli/cfg.php --name=guestloginbutton --set=0 php7 admin/cli/cfg.php --name=enrol_plugins_enabled --set=manual php7 admin/cli/cfg.php --name=enablemobilewebservice --set=0 php7 admin/cli/cfg.php --name=enablebadges --set=0 php7 admin/cli/cfg.php --name=timezone --set="${MOODLE_TIMEZONE-Europe/Madrid}" - php7 admin/cli/purge_caches.php + php7 admin/cli/upgrade.php --non-interactive + php7 theme/cbe/postinstall.php \ + --wwwroot="moodle.${DD_DOMAIN}" \ + --ncadmin="${NEXTCLOUD_ADMIN_USER}" \ + --ncpass="${NEXTCLOUD_ADMIN_PASSWORD}" \ + --sitename="${DD_TITLE}" \ + --contactname="${DD_LETSENCRYPT_EMAIL}" \ + --contactemail="${DD_LETSENCRYPT_EMAIL}" + php7 admin/cli/maintenance.php --disable EOF } @@ -904,6 +913,9 @@ case "$OPERATION" in setup_moodle setup_wordpress + chown 82:82 /opt/DD/data/moodle/saml2/* + chmod 777 /opt/DD/data/moodle/saml2/* + saml --no-up cat <<-EOF diff --git a/dd-install.sh b/dd-install.sh index 8708ef2..7ad873b 100755 --- a/dd-install.sh +++ b/dd-install.sh @@ -238,22 +238,6 @@ sleep 30 ./dd-ctl down ./dd-ctl up -# Address Moodle custom settings, plugins and registration -NEXTCLOUD_ADMIN_USER="$(grep -E '^NEXTCLOUD_ADMIN_USER=' dd.conf | cut -d = -f 2-)" -NEXTCLOUD_ADMIN_PASSWORD="$(grep -E '^NEXTCLOUD_ADMIN_PASSWORD=' dd.conf | cut -d = -f 2-)" -docker exec -i -u nobody dd-apps-moodle sh -s <