24 lines
1.2 KiB
PowerShell
24 lines
1.2 KiB
PowerShell
# 检查Logo配置脚本
|
|
param(
|
|
[string]$Server = "45.249.208.118",
|
|
[string]$Username = "root",
|
|
[string]$Password = "lxvhNYFZ4160",
|
|
[string]$Database = "flnxi"
|
|
)
|
|
|
|
$plinkPath = "C:\Program Files\PuTTY\plink.exe"
|
|
$hostKey = "SHA256:WZOtvC/+IWw29P8vyovSabmIRFkQ/Bnmhj+qhTshA4Q"
|
|
|
|
Write-Host "检查数据库中的Logo配置..." -ForegroundColor Cyan
|
|
$checkCmd = 'cd /root/deploy && docker compose exec -T postgres psql -U postgres -d ' + $Database + ' -c "SELECT id, header_logo_url, login_logo_url, site_name FROM system_settings LIMIT 1;"'
|
|
& $plinkPath -batch -ssh -hostkey $hostKey -pw $Password "${Username}@${Server}" $checkCmd
|
|
|
|
Write-Host "`n检查应用环境变量中的S3配置..." -ForegroundColor Cyan
|
|
$envCmd = "cd /root/deploy && docker compose exec -T app printenv | grep -E 'S3_|MINIO' | head -10"
|
|
& $plinkPath -batch -ssh -hostkey $hostKey -pw $Password "${Username}@${Server}" $envCmd
|
|
|
|
Write-Host "`n测试Logo URL访问..." -ForegroundColor Cyan
|
|
$testUrlCmd = "cd /root/deploy && docker compose exec -T app sh -c 'curl -I http://localhost:4320/api/system-settings 2>&1 | head -10'"
|
|
& $plinkPath -batch -ssh -hostkey $hostKey -pw $Password "${Username}@${Server}" $testUrlCmd
|
|
|