zioinfo-mail/scripts/deploy/copy_www_final.py
DESKTOP-TKLFCPR\ython 371f77e7ab
Some checks are pending
GUARDiA CI / Python Lint & Import Test (push) Waiting to run
GUARDiA CI / Validate Install Scripts (push) Waiting to run
GUARDiA CI / PR Validation Summary (push) Blocked by required conditions
fix(enhance-v4): APK QR 버그 수정 + 웹메일 라우터 수정
2026-06-02 20:23:55 +09:00

23 lines
969 B
Python

import paramiko, sys, time
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
c = paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect('101.79.17.164', username='root', password='1q2w3e!Q', timeout=15)
def run(label, cmd, timeout=30):
print(f'\n[{label}]')
_, o, _ = c.exec_command(cmd, timeout=timeout)
print(o.read().decode('utf-8','replace').strip()[:400])
# backend static → www 강제 복사 (rsync 방식)
run('강제 복사',
'rsync -a --update /opt/zioinfo/src/backend/src/main/resources/static/. /var/www/zioinfo/ && '
'echo "완료"')
run('GuardiaDetail CentRZHt 확인',
'ls -lh /var/www/zioinfo/assets/GuardiaDetail*.js | sort -k8 -r | head -3')
run('index.html 업데이트 확인',
'grep -o "GuardiaDetail[^\"]*" /var/www/zioinfo/index.html | head -2')
run('서비스 재시작', 'systemctl restart zioinfo && sleep 3 && systemctl is-active zioinfo')
c.close()
print('\n완료')