Changed connectivity check
parent
130bbae78c
commit
8d3a6fd4cd
|
@ -9,9 +9,10 @@ function Test-Network {
|
||||||
Write-Log "Checking internet connection..." "Yellow"
|
Write-Log "Checking internet connection..." "Yellow"
|
||||||
While ($timeout -lt 1800) {
|
While ($timeout -lt 1800) {
|
||||||
|
|
||||||
$TestNetwork = Test-NetConnection 8.8.8.8 -Port 443 -InformationLevel Quiet
|
$URLtoTest = "https://raw.githubusercontent.com/Romanitho/Winget-AutoUpdate/main/LICENSE"
|
||||||
|
$URLcontent = ((Invoke-WebRequest -URI $URLtoTest).content)
|
||||||
|
|
||||||
if ($TestNetwork) {
|
if ($URLcontent -like "*MIT License*") {
|
||||||
|
|
||||||
Write-Log "Connected !" "Green"
|
Write-Log "Connected !" "Green"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue