#!/bin/bash
echo "=== VERSIONING APP STATUS ==="
sudo -u apache php /var/www/owncloud/occ app:list 2>&1 | grep -iE 'versions|trash'
echo
echo "=== GLOBAL VERSIONS RETENTION ==="
sudo -u apache php /var/www/owncloud/occ config:system:get versions_retention_obligation 2>&1
echo
echo "=== TRASH RETENTION ==="
sudo -u apache php /var/www/owncloud/occ config:system:get trashbin_retention_obligation 2>&1
echo
echo "=== EXISTING VERSIONS DIR FOR PAVON ==="
du -sh /owncloud/pavon/files_versions 2>&1
ls /owncloud/pavon/ 2>&1
echo
echo "=== USER LIST ==="
sudo -u apache php /var/www/owncloud/occ user:list 2>&1
echo
echo "=== PER-USER VERSIONING SETTING (if any) ==="
sudo -u apache php /var/www/owncloud/occ user:setting pavon files_versions 2>&1 || true
