Files
singlechat/test_progressive_bootstrap.sh

39 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Test: Setze progressive-bootstrap auf false, damit Bot-Sessions auch die App starten
CONFIG_FILE="/etc/wt/wt_config.xml"
BACKUP_FILE="${CONFIG_FILE}.backup.$(date +%Y%m%d_%H%M%S)"
echo "=== Backup erstellen ==="
sudo cp "$CONFIG_FILE" "$BACKUP_FILE"
echo "Backup erstellt: $BACKUP_FILE"
echo -e "\n=== Aktueller progressive-bootstrap Wert ==="
sudo grep -n "progressive-bootstrap" "$CONFIG_FILE"
echo -e "\n=== Setze progressive-bootstrap auf false ==="
sudo sed -i 's|<progressive-bootstrap>true</progressive-bootstrap>|<progressive-bootstrap>false</progressive-bootstrap>|' "$CONFIG_FILE"
echo -e "\n=== Neuer Wert ==="
sudo grep -n "progressive-bootstrap" "$CONFIG_FILE"
echo -e "\n=== Service neu starten ==="
sudo systemctl restart ypchat.service
sleep 3
echo -e "\n=== Service-Status ==="
sudo systemctl status ypchat.service --no-pager | grep -E "Active|since" | head -2
echo -e "\n=== Test mit Googlebot ==="
curl -s -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" \
https://www.ypchat.net/ | grep -i "meta.*robots" | head -1
echo -e "\n=== Prüfe, ob App-Inhalte vorhanden sind ==="
curl -s -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" \
https://www.ypchat.net/ | grep -i "yp direct\|chat starten" | head -1
echo -e "\n=== Fertig! ==="
echo "Hinweis: Wenn das nicht funktioniert, kann mit dem Backup wiederhergestellt werden:"
echo "sudo cp $BACKUP_FILE $CONFIG_FILE"