improved wpchecker while in vacation

This commit is contained in:
2026-09-07 10:01:17 +02:00
parent 83c3b620e9
commit e87a48cd7a
3 changed files with 187 additions and 13 deletions
+28
View File
@@ -0,0 +1,28 @@
#! /usr/bin/env bash
# Tool zum Schnellen prüfen mehrerer WordPress-Installationen
# Maintainer: peignerpausz
declare -a WORDPRESS=()
WORDPRESS="$(ls | grep wordpress)"
printf "Beginne Prüfung der Adminnutzer\n\n"
for wordpress in wordpress*/; do
[[ -d "$wordpress" ]] || continue
echo "Prüfe $wordpress"
userlist=$(php ~/bin/wp-cli.phar user list --role=administrator --path="$wordpress" 2>/dev/null)
if [[ -n "$userlist" ]]; then
printf "%s\n\n" "$userlist"
else
printf "Fehler bei %s\n\n" "$wordpress"
fi
done
for uneasy in $(find html/. -type f -name "wp-config.php" -exec dirname {} \;); do
[[ -f "$uneasy" ]] || continue
echo "Prüfe $uneasy"
userlist2=$(php ~/bin/wp-cli.phar user list --role=administrator --path="$uneasy")
echo $userlist2
if [[ -n "$userlist2" ]]; then
printf "%s\n\n" "$userlist2"
else
printf "Fehler bei %s\n\n" "$uneasy"
fi
done