mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-08 14:15:25 +08:00
updating netclient.exe for new gui
This commit is contained in:
parent
d6c597e2ee
commit
14b1f561b1
6 changed files with 20 additions and 17 deletions
|
@ -133,6 +133,7 @@ func Uninstall() error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
err = nil
|
||||||
// clean up OS specific stuff
|
// clean up OS specific stuff
|
||||||
if ncutils.IsWindows() {
|
if ncutils.IsWindows() {
|
||||||
daemon.CleanupWindows()
|
daemon.CleanupWindows()
|
||||||
|
@ -159,19 +160,21 @@ func LeaveNetwork(network string, force bool) error {
|
||||||
if node.IsServer != "yes" {
|
if node.IsServer != "yes" {
|
||||||
token, err := Authenticate(cfg)
|
token, err := Authenticate(cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to authenticate %w", err)
|
logger.Log(0, "unable to authenticate: "+err.Error())
|
||||||
}
|
|
||||||
url := "https://" + cfg.Server.API + "/api/nodes/" + cfg.Network + "/" + cfg.Node.ID
|
|
||||||
response, err := API("", http.MethodDelete, url, token)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("error deleting node on server %w", err)
|
|
||||||
}
|
|
||||||
if response.StatusCode == http.StatusOK {
|
|
||||||
logger.Log(0, "deleted node", cfg.Node.Name, " on network ", cfg.Network)
|
|
||||||
} else {
|
} else {
|
||||||
bodybytes, _ := io.ReadAll(response.Body)
|
url := "https://" + cfg.Server.API + "/api/nodes/" + cfg.Network + "/" + cfg.Node.ID
|
||||||
defer response.Body.Close()
|
response, err := API("", http.MethodDelete, url, token)
|
||||||
return fmt.Errorf("error deleting node on server %s %s", response.Status, string(bodybytes))
|
if err != nil {
|
||||||
|
logger.Log(0, "error deleting node on server: "+err.Error())
|
||||||
|
} else {
|
||||||
|
if response.StatusCode == http.StatusOK {
|
||||||
|
logger.Log(0, "deleted node", cfg.Node.Name, " on network ", cfg.Network)
|
||||||
|
} else {
|
||||||
|
bodybytes, _ := io.ReadAll(response.Body)
|
||||||
|
defer response.Body.Close()
|
||||||
|
logger.Log(0, fmt.Sprintf("error deleting node on server %s %s", response.Status, string(bodybytes)))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wgClient, wgErr := wgctrl.New()
|
wgClient, wgErr := wgctrl.New()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//go:generate goversioninfo -icon=windowsdata/resource/netmaker.ico -manifest=netclient.exe.manifest.xml -64=true -o=netclient.syso
|
//go:generate goversioninfo -icon=windowsdata/resource/netclient.ico -manifest=netclient.exe.manifest.xml -64=true -o=netclient.syso
|
||||||
// -build gui
|
// -build gui
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
<assemblyIdentity
|
<assemblyIdentity
|
||||||
version="0.13.1.0"
|
version="0.14.0.0"
|
||||||
processorArchitecture="*"
|
processorArchitecture="*"
|
||||||
name="netclient.exe"
|
name="netclient.exe"
|
||||||
type="win32"
|
type="win32"
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
"FixedFileInfo": {
|
"FixedFileInfo": {
|
||||||
"FileVersion": {
|
"FileVersion": {
|
||||||
"Major": 0,
|
"Major": 0,
|
||||||
"Minor": 9,
|
"Minor": 14,
|
||||||
"Patch": 0,
|
"Patch": 0,
|
||||||
"Build": 0
|
"Build": 0
|
||||||
},
|
},
|
||||||
"ProductVersion": {
|
"ProductVersion": {
|
||||||
"Major": 0,
|
"Major": 0,
|
||||||
"Minor": 9,
|
"Minor": 14,
|
||||||
"Patch": 0,
|
"Patch": 0,
|
||||||
"Build": 0
|
"Build": 0
|
||||||
},
|
},
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
"OriginalFilename": "",
|
"OriginalFilename": "",
|
||||||
"PrivateBuild": "",
|
"PrivateBuild": "",
|
||||||
"ProductName": "Netclient",
|
"ProductName": "Netclient",
|
||||||
"ProductVersion": "v0.13.1.0",
|
"ProductVersion": "v0.14.0.0",
|
||||||
"SpecialBuild": ""
|
"SpecialBuild": ""
|
||||||
},
|
},
|
||||||
"VarFileInfo": {
|
"VarFileInfo": {
|
||||||
|
|
BIN
netclient/windowsdata/resource/netclient.ico
Normal file
BIN
netclient/windowsdata/resource/netclient.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 983 B |
Binary file not shown.
Before Width: | Height: | Size: 7.4 KiB |
Loading…
Add table
Reference in a new issue