DD- facilita la instalacion desde el dd-ctl
parent
895a20abba
commit
16be3513d6
14
dd-ctl
14
dd-ctl
|
@ -443,12 +443,21 @@ setup_moodle(){
|
||||||
echo " --> Applying custom settings in moodle"
|
echo " --> Applying custom settings in moodle"
|
||||||
# TODO: check why admin/cli/cfg can't be read with -u nobody
|
# TODO: check why admin/cli/cfg can't be read with -u nobody
|
||||||
docker exec -i dd-apps-moodle sh -s <<-EOF
|
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=guestloginbutton --set=0
|
||||||
php7 admin/cli/cfg.php --name=enrol_plugins_enabled --set=manual
|
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=enablemobilewebservice --set=0
|
||||||
php7 admin/cli/cfg.php --name=enablebadges --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/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
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,6 +913,9 @@ case "$OPERATION" in
|
||||||
setup_moodle
|
setup_moodle
|
||||||
setup_wordpress
|
setup_wordpress
|
||||||
|
|
||||||
|
chown 82:82 /opt/DD/data/moodle/saml2/*
|
||||||
|
chmod 777 /opt/DD/data/moodle/saml2/*
|
||||||
|
|
||||||
saml --no-up
|
saml --no-up
|
||||||
|
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
|
|
|
@ -238,22 +238,6 @@ sleep 30
|
||||||
./dd-ctl down
|
./dd-ctl down
|
||||||
./dd-ctl up
|
./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
|
## Ensure SAML is set up
|
||||||
./dd-ctl saml --no-up
|
./dd-ctl saml --no-up
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue