mirror of
https://github.com/DrewThomasson/ebook2audiobook.git
synced 2026-01-09 22:08:13 -05:00
...
This commit is contained in:
8
.bh.ps1
8
.bh.ps1
@@ -1,17 +1,19 @@
|
||||
param(
|
||||
[string]$HostName = "127.0.0.1",
|
||||
[int]$Port = 7860,
|
||||
[int]$Timeout = 60
|
||||
[int]$Timeout = 90
|
||||
)
|
||||
|
||||
for ($i = 1; $i -le $Timeout; $i++) {
|
||||
try {
|
||||
$tcp = [System.Net.Sockets.TcpClient]::new()
|
||||
$tcp.Connect($HostName, $Port)
|
||||
$tcp.Close()
|
||||
Start-Process "http://${HostName}:$Port/"
|
||||
break
|
||||
exit 0
|
||||
}
|
||||
catch {
|
||||
Start-Sleep -Seconds 1
|
||||
}
|
||||
}
|
||||
}
|
||||
exit 0
|
||||
Reference in New Issue
Block a user