Revert "DD- facilita la instalacion desde el dd-ctl"

This reverts commit bd27ef4b6a.

Which is generating various installation issues.
GON-3874-DD-moodle
Evilham 2022-11-13 10:02:24 +01:00
parent bd27ef4b6a
commit f355b160a1
No known key found for this signature in database
GPG Key ID: AE3EE30D970886BF
2 changed files with 17 additions and 13 deletions

14
dd-ctl
View File

@ -444,21 +444,12 @@ 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/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
php7 admin/cli/purge_caches.php
EOF
}
@ -914,9 +905,6 @@ 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

View File

@ -238,6 +238,22 @@ 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 <<EOF
php admin/cli/maintenance.php --enable
php admin/cli/upgrade.php --non-interactive
php 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}"
php admin/cli/maintenance.php --disable
EOF
## Ensure SAML is set up
./dd-ctl saml --no-up