保留独立增量镜像隧道进程
This commit is contained in:
parent
36fee605c6
commit
bc65d7c7e2
@ -30,6 +30,7 @@ $repoRoot = (Resolve-Path (Join-Path $scriptRoot '..')).Path
|
||||
. (Join-Path $scriptRoot 'deploy-auth.ps1')
|
||||
$authSession = $null
|
||||
$sshOptions = @()
|
||||
$tunnelSshOptions = @()
|
||||
$scpOptions = @()
|
||||
if ($IsMacOS) { $scpOptions += '-O' }
|
||||
$sshControlPath = if ($IsMacOS) { "/tmp/caiwu-ssh-$PID-$([Guid]::NewGuid().ToString('N')).sock" } else { $null }
|
||||
@ -280,7 +281,7 @@ function Start-RegistryTunnel {
|
||||
$startInfo.FileName = $sshPath
|
||||
$startInfo.UseShellExecute = $false
|
||||
$startInfo.CreateNoWindow = $true
|
||||
foreach ($argument in ($sshOptions + @(
|
||||
foreach ($argument in ($tunnelSshOptions + @(
|
||||
'-N',
|
||||
'-o', 'ConnectTimeout=10',
|
||||
'-o', 'ExitOnForwardFailure=yes',
|
||||
@ -347,6 +348,7 @@ try {
|
||||
|
||||
$authSession = Start-CaiwuDeploymentAuth -Server $Server -SshUser $SshUser -KeyPath $KeyPath -Password $Password -UpdatePassword:$UpdatePassword
|
||||
$sshOptions = $authSession.Options
|
||||
$tunnelSshOptions = @($sshOptions)
|
||||
if ($sshControlPath) {
|
||||
$sshOptions += @('-o', 'ControlMaster=auto', '-o', 'ControlPersist=600', '-o', "ControlPath=$sshControlPath")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user