Add scripts to list Talk rooms from database
- list_talk_rooms.php: PHP script using Nextcloud config - get_talk_rooms.sh: Bash wrapper for PHP script - list_rooms_mysql.sh: Direct MySQL script Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
38
get_talk_rooms.sh
Normal file
38
get_talk_rooms.sh
Normal file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Skript zum Auflisten aller Nextcloud Talk Räume aus der Datenbank
|
||||
# Benötigt PHP auf dem Nextcloud-Server
|
||||
|
||||
# Farben
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m'
|
||||
|
||||
# Nextcloud-Verzeichnis finden
|
||||
if [ -f "./config/config.php" ]; then
|
||||
NEXTCLOUD_DIR="."
|
||||
else
|
||||
for path in /mnt/data/updater-ocubwyrxncdg/backups/nextcloud-34.0.3.2-1790150204 /var/www/nextcloud /var/www/html/nextcloud /usr/share/nextcloud /srv/nextcloud /opt/nextcloud; do
|
||||
[ -f "$path/config/config.php" ] && NEXTCLOUD_DIR="$path" && break
|
||||
done
|
||||
[ -z "$NEXTCLOUD_DIR" ] && echo -e "${RED}Fehler: Nextcloud-Verzeichnis nicht gefunden!${NC}" && exit 1
|
||||
fi
|
||||
|
||||
# PHP-Pfad finden
|
||||
PHP_PATH="$(which php 2>/dev/null)"
|
||||
for php_bin in /usr/bin/php /usr/bin/php8.* /usr/bin/php7.* /usr/local/bin/php; do
|
||||
[ -x "$php_bin" ] && PHP_PATH="$php_bin" && break
|
||||
done
|
||||
[ -z "$PHP_PATH" ] && echo -e "${RED}Fehler: PHP nicht gefunden!${NC}" && exit 1
|
||||
|
||||
# PHP-Skript ausführen
|
||||
echo -e "${BLUE}=================================================================${NC}"
|
||||
echo -e "${BLUE} Nextcloud Talk Räume aus der Datenbank${NC}"
|
||||
echo -e "${BLUE}=================================================================${NC}\n"
|
||||
|
||||
$PHP_PATH "${NEXTCLOUD_DIR}/list_talk_rooms.php"
|
||||
|
||||
echo ""
|
||||
read -p "Drücken Sie Enter zum Fortfahren..."
|
||||
Reference in New Issue
Block a user