homelab-brain/redax-wp/check-wp-push.sh
2026-03-03 16:19:53 +07:00

18 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
# Prüft ob Redax-Entwürfe auf Arakava News 2 landen
# Auf pve-hetzner: ssh root@100.88.230.59, dann:
# pct exec 113 -- bash -c 'cd /opt/redax-wp && source .env 2>/dev/null; echo "WP_URL=$WP_URL"'
echo "=== 1. WP_URL in .env (CT 113) ==="
sshpass -p 'Astral-Proxmox!2026' ssh -o StrictHostKeyChecking=no root@100.88.230.59 \
"pct exec 113 -- bash -c 'grep -E \"^WP_URL=\" /opt/redax-wp/.env 2>/dev/null || echo \"Keine .env gefunden\"'"
echo ""
echo "=== 2. Letzte Redax-Logs (draft_push) ==="
sshpass -p 'Astral-Proxmox!2026' ssh -o StrictHostKeyChecking=no root@100.88.230.59 \
"pct exec 113 -- tail -20 /opt/redax-wp/logs/redax.log 2>/dev/null | grep -E 'draft|push|article'" 2>/dev/null || echo "Keine passenden Log-Einträge"
echo ""
echo "=== 3. Letzter Artikel in Redax-DB (wp_post_id) ==="
sshpass -p 'Astral-Proxmox!2026' ssh -o StrictHostKeyChecking=no root@100.88.230.59 \
"pct exec 113 -- sqlite3 /opt/redax-wp/data/db/redax.db 'SELECT id, title, wp_post_id, status FROM articles ORDER BY id DESC LIMIT 3'" 2>/dev/null || echo "DB-Zugriff fehlgeschlagen"