Merge pull request #878 from gravitl/develop

Develop
This commit is contained in:
dcarns 2022-03-08 07:55:54 -05:00 committed by GitHub
commit 8e7bec08aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View file

@ -144,7 +144,7 @@ func NodeUpdate(client mqtt.Client, msg mqtt.Message) {
if newNode.DNSOn != "yes" && shouldDNSChange && nodeCfg.Node.Interface != "" {
ncutils.Log("settng DNS off")
if err := removeHostDNS(ncutils.IsWindows()); err != nil {
ncutils.Log("error removing netmaker profile from /etc/hosts " + dataErr.Error())
ncutils.Log("error removing netmaker profile from /etc/hosts " + err.Error())
}
// _, err := ncutils.RunCmd("/usr/bin/resolvectl revert "+nodeCfg.Node.Interface, true)
// if err != nil {
@ -205,7 +205,7 @@ func UpdatePeers(client mqtt.Client, msg mqtt.Message) {
}
} else {
if err := removeHostDNS(ncutils.IsWindows()); err != nil {
ncutils.Log("error removing netmaker profile from /etc/hosts " + dataErr.Error())
ncutils.Log("error removing netmaker profile from /etc/hosts " + err.Error())
return
}
}

View file

@ -30,7 +30,7 @@ new-module -name netclient-install -scriptblock {
If(-Not $installed) {
Quit "Could not install WireGuard"
} else {
$env:Path += (";" + $env:ProgramFiles + "\WireGuard")
# $env:Path += (";" + $env:ProgramFiles + "\WireGuard")
Write-Host "'$software' is installed."
}
} else {
@ -48,7 +48,7 @@ new-module -name netclient-install -scriptblock {
$loc = Get-Location
Copy-Item -Path "$env:userprofile\Downloads\netclient.exe" -Destination "$loc\netclient.exe"
}
$runNum = "one","two"
$runNum = "one"
foreach ($run in $runNum) {
$NetArgs = @("join","-t",$token)
@ -65,11 +65,13 @@ new-module -name netclient-install -scriptblock {
$env:Path += ";C:\ProgramData\Netclient\bin"
}
}
if($run -eq "one"){
Write-Host "re-running setup to confirm all components are installed."
Start-Sleep -s 1
}
#if($run -eq "one"){
# Write-Host "re-running setup to confirm all components are installed."
# Start-Sleep -s 1
#}
}
Start-Sleep -s 5
Write-Host "'netclient' is installed."
}
}