#!/bin/bash
cd /homez.432/citronze/www/hosting/
EXCLUDE="audreymaurel|AVEVE|imprimerieblachon|OSTEOBBOUDIN|ssl|non-wp"

for site in */; do
    site=${site%/}
    [[ "$site" =~ ^($EXCLUDE)$ ]] && continue
    [ -f "$site/wp-config.php" ] || continue

    OUT=$(~/bin/wp plugin verify-checksums --all --path=/homez.432/citronze/www/hosting/$site/ 2>/dev/null)
    REAL=$(echo "$OUT" | grep "does not match" | grep -v "wp-mail-smtp.*vendor/autoload.php")

    if [ -n "$REAL" ]; then
        echo "=== $site ==="
        echo "$REAL"
    fi
done
