feat: import Sea vHost single-server testing release
This commit is contained in:
commit
248badd33e
441 files changed
+63221
No files matched your search
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set +e
|
||||
|
||||
/www/server/panel/pyenv/bin/python3 - <<'PY'
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
for candidate in (Path('/www/server/panel/config/api.json'), Path('/www/server/panel/data/api.json')):
|
||||
if not candidate.is_file() or candidate.is_symlink():
|
||||
continue
|
||||
try:
|
||||
payload = json.loads(candidate.read_text(encoding='utf-8'))
|
||||
except Exception as exc:
|
||||
print(f'{candidate}: invalid JSON ({type(exc).__name__})')
|
||||
continue
|
||||
print(candidate)
|
||||
if isinstance(payload, dict):
|
||||
for key, value in payload.items():
|
||||
if isinstance(value, list):
|
||||
print(f' {key}: list[{len(value)}]')
|
||||
else:
|
||||
print(f' {key}: {type(value).__name__}')
|
||||
else:
|
||||
print(f' root: {type(payload).__name__}')
|
||||
PY
|
||||
Reference in new issue
Block a user