本次提交包含大量代码优化、功能新增与服务端配置更新: 1. 修复分析报告统计数据,调整CMake策略设置 2. 优化APP权限配置、编辑器与聊天界面组件 3. 更新依赖库版本与pubspec配置 4. 新增文件传输服务端、信令服务器相关配置与脚本 5. 完善用户注销功能与数据库迁移脚本 6. 优化多处动画效果、代码风格与日志输出 7. 新增多种调试与部署脚本,修复已知BUG
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
import paramiko
|
|
|
|
ssh = paramiko.SSHClient()
|
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
ssh.connect('123.207.67.197', 22, 'root', '520Kiss123')
|
|
|
|
print('=== Create test file ===')
|
|
stdin, stdout, stderr = ssh.exec_command('echo "test content 12345" > /tmp/test_upload.txt && cat /tmp/test_upload.txt')
|
|
print(stdout.read().decode())
|
|
|
|
print('=== Test upload with verbose ===')
|
|
stdin, stdout, stderr = ssh.exec_command(
|
|
'curl -sv -X POST "https://tools.wktyl.com/api/cloud_cache/upload" '
|
|
'-F "file=@/tmp/test_upload.txt" '
|
|
'-F "fromId=device_test" '
|
|
'-F "toId=device_test2" '
|
|
'-F "fileName=test.txt" '
|
|
'-F "fileSize=18" '
|
|
'-F "mimeType=text/plain" 2>&1'
|
|
)
|
|
print(stdout.read().decode())
|
|
|
|
print('=== Check PHP error logs ===')
|
|
stdin, stdout, stderr = ssh.exec_command(
|
|
'find /www/wwwroot/tools.wktyl.com/runtime -name "*.log" -mmin -5 -exec tail -20 {} \\; 2>/dev/null'
|
|
)
|
|
print(stdout.read().decode())
|
|
|
|
print('=== Check nginx error log ===')
|
|
stdin, stdout, stderr = ssh.exec_command(
|
|
'tail -10 /www/server/nginx/logs/tools.wktyl.com.log 2>/dev/null || tail -10 /var/log/nginx/error.log 2>/dev/null || echo "no nginx log"'
|
|
)
|
|
print(stdout.read().decode())
|
|
|
|
ssh.close()
|