Restic: Only set PRE- and POST_COMMANDS when Nextcloud is included

This commit is contained in:
Sam A. 2023-11-11 14:57:30 +01:00
parent c816f3d551
commit f6db815eff
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -20,10 +20,12 @@ services:
--keep-daily 7
--keep-weekly 5
--keep-monthly 12
{% if 'nextcloud' in apps_backup %}
PRE_COMMANDS: |-
docker compose -f {{ apps_data_root }}/nextcloud/docker-compose.yml exec -u www-data app php occ maintenance:mode --on
POST_COMMANDS_EXIT: |-
docker compose -f {{ apps_data_root }}/nextcloud/docker-compose.yml exec -u www-data app php occ maintenance:mode --off
{% endif %}
B2_ACCOUNT_ID: {{ restic.b2.id }}
B2_ACCOUNT_KEY: {{ restic.b2.key }}
TZ: {{ timezone }}