diff --git a/scripts/enter-host.ps1 b/scripts/enter-host.ps1 index 4c6a7e26..0d308458 100755 --- a/scripts/enter-host.ps1 +++ b/scripts/enter-host.ps1 @@ -31,7 +31,10 @@ try { } & "$PSScriptRoot/ping-host.ps1" $remoteHost - if ($lastExitCode -ne "0") { exit 1 } + if ($lastExitCode -ne "0") { + Write-Host "Let's try to wake '$remoteHost' up..." + & "$PSScriptRoot/wake-up-host.ps1" + } Write-Host "⏳ Connecting as user '$remoteUser' using " -noNewline & ssh -V diff --git a/scripts/ping-host.ps1 b/scripts/ping-host.ps1 index b5f841da..e0373295 100755 --- a/scripts/ping-host.ps1 +++ b/scripts/ping-host.ps1 @@ -27,7 +27,7 @@ function GetPingLatency([string]$hostname) { try { [int]$latency = GetPingLatency($hostname) if ($latency -eq 1500) { - Write-Host "⚠️ Host '$hostname' doesn't respond - check the connection or wake the host up." + Write-Host "⚠️ Host '$hostname' doesn't respond - check the connection or maybe the host is down." exit 1 } Write-Host "✅ $hostname is up and running ($($latency)ms latency)."