Memeriksa ada berapa plugins yang terpasang di Moodle (4.5 ke atas)

Terkadang kita perlu membandingkan beberapa VM Moodle yang terletak di belakang LB, untuk meyakinkan bahwa tidak ada perbedaan plugin di antara mereka.

root@drsvcbt02:~# cd /var/www/html
find . -name version.php -not -path "./version.php" -not -path "*/node_modules/*" -not -path "*/tests/*" \
 | sort | while read f; do
   echo "$f $(grep -E "component|\\\$plugin->version" $f | tr -d ' \n')"
 done > /tmp/plugins_$(hostname).txt
wc -l /tmp/plugins_$(hostname).txt

Hasilnya kira-kira seperti ini:

516 /tmp/plugins_drsvcbt02.txt

Berarti ada 516 buah plugins