From 2524965780878fc57b67ea8ccb36b72d57d27506 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 7 Jan 2025 21:20:40 +0100 Subject: [PATCH] fix: [collabora,nextcloud] prevent ``collabora`` and ``nextcloud`` bases services to accidentaly remove crontabs --- collabora/hooks/post_deploy | 2 +- nextcloud/lib/common | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/collabora/hooks/post_deploy b/collabora/hooks/post_deploy index eac610e..e839ed6 100755 --- a/collabora/hooks/post_deploy +++ b/collabora/hooks/post_deploy @@ -76,7 +76,7 @@ if [ ${#nextcloud_services[@]} != 0 ]; then ## Activate-config will make nextcloud try to connect to collabora. ## This is why we must run this in post_deploy - compose --no-relations --no-init \ + compose --no-relations --no-init --no-pre-deploy \ occ "$nextcloud_service" \ app:install richdocuments \; \ config:app:set --value="${collabora_url}" richdocuments wopi_url \; \ diff --git a/nextcloud/lib/common b/nextcloud/lib/common index 34b494b..0ab432b 100644 --- a/nextcloud/lib/common +++ b/nextcloud/lib/common @@ -137,7 +137,8 @@ occ() { ## We need here actually only the relation sql-database. Any other hook ## using `occ` would make the call infinitively recursive. export COMPOSE_IGNORE_ORPHANS=true - compose --debug -q --no-init --without-relation="$SERVICE_NAME":web-proxy run \ + compose --debug -q --no-init --no-pre-deploy \ + --without-relation="$SERVICE_NAME":web-proxy run \ "${occ_docker_run_opts[@]}" \ -v "$HOST_CHARM_STORE/${CHARM_REL_PATH#${CHARM_STORE}/}/src/occ.batch:/var/www/html/occ.batch" \ -T --rm -u www-data "$SERVICE_NAME" /var/www/html/occ.batch "$@" | cat