diff --git a/nextcloud.yml b/nextcloud.yml index 86ab2c9..aac2f0c 100644 --- a/nextcloud.yml +++ b/nextcloud.yml @@ -402,6 +402,14 @@ docker compose exec -T -u www-data nextcloud.{{inventory_hostname}} ./occ talk:stun:add turn.{{inventory_hostname}}:5349 docker compose exec -T -u www-data nextcloud.{{inventory_hostname}} ./occ talk:stun:delete stun.nextcloud.com:443 fi + if [ -s /home/docker/nextcloud.{{inventory_hostname}}/nextcloud-data/data/nextcloud.log ] + then + docker compose -f /home/docker/nextcloud.{{inventory_hostname}}/docker-compose.yml exec -ti -u www-data nextcloud.{{inventory_hostname}} ./occ log:tail 1000 | grep " Error " | grep -v "Can't get app storage," >"${g_tmp}/nextcloud-error.log" + if [ -s "${g_tmp}/nextcloud-error.log" ] + then + g_echo_error "Errors in Nextcloud Log: $(cat "${g_tmp}/nextcloud-error.log")" + fi + fi backup: yes validate: /bin/bash -n %s notify: run nextcloud.update