26 lines
1.1 KiB
Python
26 lines
1.1 KiB
Python
import paramiko, sys
|
|
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()[:500])
|
|
|
|
# backend static에 실제로 있는지 확인
|
|
run('backend static assets 최신',
|
|
'ls -lh /opt/zioinfo/src/backend/src/main/resources/static/assets/GuardiaDetail*.js | sort -k6,7 -r | head -5')
|
|
|
|
# 직접 새 파일만 복사
|
|
run('새 파일 직접 복사',
|
|
'cp /opt/zioinfo/src/backend/src/main/resources/static/assets/GuardiaDetail-CentRZHt.js /var/www/zioinfo/assets/ && '
|
|
'cp /opt/zioinfo/src/backend/src/main/resources/static/index.html /var/www/zioinfo/index.html && '
|
|
'echo "복사 완료"')
|
|
|
|
run('복사 후 확인',
|
|
'ls -lh /var/www/zioinfo/assets/GuardiaDetail-CentRZHt.js && '
|
|
'grep -o "GuardiaDetail[^\"]*js" /var/www/zioinfo/index.html | head -2')
|
|
|
|
c.close()
|