#!/usr/bin/env bash # Read-only: list sites and verify their document roots still exist. set -uo pipefail ENTRY="${1:-ipdduiyy}" BASE="http://127.0.0.1:8888/$ENTRY" PASS=$(awk -F': ' '/^password:/{print $2}' /www/server/panel/data/initial_password.txt) curl -s -c /tmp/ck.txt -H 'Content-Type: application/json' -H 'Origin: http://127.0.0.1:8888' \ -d "{\"username\":\"admin\",\"password\":\"$PASS\"}" "$BASE/api/v1/auth/login" >/dev/null curl -s -b /tmp/ck.txt "$BASE/api/v1/sites" > /tmp/sites.json python3 - <<'PY' import json, os sites = json.load(open('/tmp/sites.json'))['data'] print('sites:', len(sites)) for s in sites: root = s['root'] print('%-4s %-18s %-6s %-10s %-28s %s' % ( s['id'], s['name'], s['kind'], s['status'], ','.join(s['domains']), 'OK' if os.path.isdir(root) else 'MISSING')) PY echo "--- /www/wwwroot ---" ls -la /www/wwwroot echo "--- units ---" ls /etc/systemd/system/miaopanel-site-*.service 2>/dev/null echo "--- services ---" systemctl list-units 'miaopanel-site-*' --no-legend --no-pager 2>/dev/null | head