#!/bin/bash
A=~/abtan
echo "########## FIX ABTAN $(date) ##########"
echo "== plugins installes (dossiers) =="; ls -1 "$A/wp-content/plugins" 2>/dev/null | sed 's/^/   /'
echo "== restauration active_plugins =="; php ~/_restore_active.php
echo "== re-bootstrap PHP 8.1 (plugins actifs) =="
( cd "$A" && php ~/_diag_boot.php ) 2>&1 | grep -aE '===|atal|rror|match|wpbakery|undefined' | head -8
echo "== purge cache =="; rm -rf "$A/wp-content/cache/"* 2>/dev/null; echo "  ok"
echo "########## FIN FIX $(date) ##########"
