zioinfo-mail/scripts/misc/fix_logo_manager.py
DESKTOP-TKLFCPR\ython 28d3ba4836 refactor(cleanup): commit folder reorganization - scripts/, _archive/, docs/ restructure
- Move backend/frontend/messenger/ old paths to _archive/
- Reorganize scripts into scripts/deploy, check, push, setup, misc
- Move docs (pptx, docx) to docs/
- Add .claude agents and skills for fullstack/folder-cleanup harness
- workspace/ projects remain intact

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 19:43:09 +09:00

58 lines
1.9 KiB
Python

import paramiko, sys, json
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect('101.79.17.164', username='root', password='1q2w3e!Q', timeout=15)
sftp = client.open_sftp()
def run(label, cmd, timeout=30):
print(f'\n[{label}]')
_, o, e = client.exec_command(cmd, timeout=timeout)
out = o.read().decode('utf-8', errors='replace').strip()
if out: print(out[:500])
# 1. 로고 이미지 수정: /var/www/zioinfo/zioinfo-logo.png 가 있는지 확인
run('현재 로고 파일 목록', 'ls -la /var/www/zioinfo/zioinfo-logo*.png 2>/dev/null')
# 2. zioinfo-logo.png는 라이트 배경용, zioinfo-logo-dark.png는 다크 배경용
# 현재 서버에 zioinfo-logo-dark.png가 없을 수 있음
run('로고 파일 확인', 'ls /var/www/zioinfo/*.png 2>/dev/null | head -10')
# 3. Manager 인증 방식 확인
run('Manager auth', """
find /opt/manager/backend -name "*.py" | xargs grep -l "login\|auth\|token" 2>/dev/null | head -5
""")
run('Manager routers', """
find /opt/manager/backend/routers -name "*.py" 2>/dev/null | head -10
ls /opt/manager/backend/routers/ 2>/dev/null
""")
run('Manager login API', """
# ITSM 계정으로 Manager 로그인 시도
curl -sf -X POST http://127.0.0.1:8002/api/system/login \
-H 'Content-Type: application/json' \
-d '{"username":"admin","password":"Admin@2026!"}' 2>/dev/null | head -c 200
echo ""
curl -sf -X POST http://127.0.0.1:8002/api/auth/login \
-H 'Content-Type: application/json' \
-d '{"username":"admin","password":"Admin@2026!"}' 2>/dev/null | head -c 200
echo ""
# Manager API 목록
curl -sf http://127.0.0.1:8002/openapi.json 2>/dev/null | python3 -c "
import sys,json
d=json.load(sys.stdin)
paths = list(d.get('paths',{}).keys())
auth_paths = [p for p in paths if 'auth' in p or 'login' in p]
print('Auth paths:', auth_paths[:10])
" 2>/dev/null
""")
sftp.close()
client.close()