diff --git a/dd-ctl b/dd-ctl index 42cde0a..bf967d6 100755 --- a/dd-ctl +++ b/dd-ctl @@ -356,20 +356,18 @@ setup_nextcloud(){ EOF fi + #docker exec -u www-data dd-apps-nextcloud-app php occ app:install user_saml + docker exec -u www-data dd-apps-nextcloud-app php occ app:enable user_saml + + # Installing apps may require an occ upgrade + nextcloud_upgrade + # Temporary patch while upstream lands our changes # See: https://github.com/nextcloud/mail/pull/6908 for f in appinfo/info.xml lib/Command/UpdateAccount.php lib/Db/MailAccountMapper.php; do install -m 0644 -o 82 -g 82 "dd-apps/docker/nextcloud/nc_mail/$f" "${SRC_FOLDER}/nextcloud/custom_apps/mail/$f" done - # Custom forms - docker exec dd-apps-nextcloud-app apk add git npm composer - docker exec -u www-data dd-apps-nextcloud-app rm -rf /var/www/html/custom_apps/forms - docker exec -u www-data dd-apps-nextcloud-app git clone https://github.com/juanan3ip/form -b dev /var/www/html/custom_apps/forms - docker exec -u www-data dd-apps-nextcloud-app npm --prefix /var/www/html/custom_apps/forms install - docker exec -u www-data dd-apps-nextcloud-app composer -d/var/www/html/custom_apps/forms install --no-dev -o - docker exec -u www-data dd-apps-nextcloud-app php occ app:enable forms - # Disable Big Blue Button media check by default docker exec -u www-data dd-apps-nextcloud-app php occ config:app:set bbb join.mediaCheck --value="false" # Disable Big Blue Button listen only mode by default @@ -384,11 +382,8 @@ setup_nextcloud(){ docker exec -u www-data dd-apps-nextcloud-app php occ --no-warnings config:system:set allow_local_remote_servers --value=true docker exec -u www-data dd-apps-nextcloud-app php occ --no-warnings maintenance:theme:update - #docker exec -u www-data dd-apps-nextcloud-app php occ app:install user_saml - docker exec -u www-data dd-apps-nextcloud-app php occ app:enable user_saml docker exec dd-apps-nextcloud-app apk add jq docker exec dd-apps-nextcloud-app sh -c 'jq ". + {\"pad\": [\"application/x-ownpad\"], \"calc\": [\"application/x-ownpad\"]}" /var/www/html/resources/config/mimetypemapping.dist.json > /var/www/html/config/mimetypemapping.json' - nextcloud_scan # Open pads in a new tab/window docker exec dd-apps-nextcloud-app sed -i.orig 's/^\(\s*\)\(var viewer = OC.generateUrl.*\)/\1\2\n\1window.open(viewer);\n\1return;/' /var/www/html/custom_apps/ownpad/js/ownpad.js @@ -472,16 +467,25 @@ setup_nextcloud(){ # Add default file for moodle activities if [ ! -f "$DATA_FOLDER/nextcloud/admin/files/template.docx" ]; then cp dd-apps/docker/nextcloud/template.docx "$DATA_FOLDER/nextcloud/admin/files/" - nextcloud_scan fi - configure_nextcloud_logo + # Custom forms + ## This may be forcing the need for occ upgrade in the past + ## Keep it towards the end + docker exec dd-apps-nextcloud-app apk add git npm composer + docker exec -u www-data dd-apps-nextcloud-app rm -rf /var/www/html/custom_apps/forms + docker exec -u www-data dd-apps-nextcloud-app git clone https://github.com/juanan3ip/form -b dev /var/www/html/custom_apps/forms + docker exec -u www-data dd-apps-nextcloud-app npm --prefix /var/www/html/custom_apps/forms install + docker exec -u www-data dd-apps-nextcloud-app composer -d/var/www/html/custom_apps/forms install --no-dev -o + docker exec -u www-data dd-apps-nextcloud-app php occ app:enable forms nextcloud_upgrade + configure_nextcloud_logo + nextcloud_scan } nextcloud_upgrade(){ - docker-compose exec -u www-data dd-apps-nextcloud-app ./occ upgrade + docker exec -i -u www-data dd-apps-nextcloud-app ./occ upgrade } nextcloud_scan(){