mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-01 01:14:24 +08:00
fixed window bug? removed binaries
This commit is contained in:
parent
30edc85b14
commit
6418378b07
9 changed files with 10 additions and 11 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -9,6 +9,8 @@ netclient/netclient-amd64
|
|||
netclient/netclient-arm
|
||||
netclient/netclient-arm64
|
||||
netclient/netclient-32
|
||||
netclient/netclient32
|
||||
netclient/netclient.exe
|
||||
config/dnsconfig/
|
||||
winsw.exe
|
||||
data/
|
||||
|
|
|
@ -108,9 +108,9 @@ func CreateServerToken(netID string) (string, error) {
|
|||
GRPCSSL: "off",
|
||||
}
|
||||
}
|
||||
log.Println("APIConnString:",servervals.APIConnString)
|
||||
log.Println("GRPCConnString:",servervals.GRPCConnString)
|
||||
log.Println("GRPCSSL:",servervals.GRPCSSL)
|
||||
log.Println("APIConnString:", servervals.APIConnString)
|
||||
log.Println("GRPCConnString:", servervals.GRPCConnString)
|
||||
log.Println("GRPCSSL:", servervals.GRPCSSL)
|
||||
accessToken.ServerConfig = servervals
|
||||
accessToken.ClientConfig.Network = netID
|
||||
accessToken.ClientConfig.Key = GenKey()
|
||||
|
@ -123,7 +123,7 @@ func CreateServerToken(netID string) (string, error) {
|
|||
return accesskey.AccessString, err
|
||||
}
|
||||
accesskey.AccessString = base64.StdEncoding.EncodeToString([]byte(tokenjson))
|
||||
log.Println("accessstring:",accesskey.AccessString)
|
||||
log.Println("accessstring:", accesskey.AccessString)
|
||||
network.AccessKeys = append(network.AccessKeys, accesskey)
|
||||
if data, err := json.Marshal(network); err != nil {
|
||||
return "", err
|
||||
|
@ -235,6 +235,7 @@ func UpdateNetworkNodeAddresses(networkName string) error {
|
|||
}
|
||||
|
||||
node.Address = ipaddr
|
||||
node.PullChanges = "yes"
|
||||
data, err := json.Marshal(&node)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -35,9 +35,9 @@ func SetupWindowsDaemon() error {
|
|||
ncutils.Log("finished daemon setup")
|
||||
}
|
||||
// install daemon, will not overwrite
|
||||
ncutils.RunCmd(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1)+`winsw.exe install`, true)
|
||||
ncutils.RunCmd(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1)+`winsw.exe install`, false)
|
||||
// start daemon, will not restart or start another
|
||||
ncutils.RunCmd(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1)+`winsw.exe start`, true)
|
||||
ncutils.RunCmd(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1)+`winsw.exe start`, false)
|
||||
ncutils.Log(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1) + `winsw.exe start`)
|
||||
return nil
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -274,10 +274,6 @@ func SetWGConfig(network string, peerupdate bool) error {
|
|||
} else {
|
||||
err = InitWireguard(&nodecfg, privkey, peers, hasGateway, gateways)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -299,7 +295,7 @@ func ApplyConf(confPath string) error {
|
|||
var err error
|
||||
switch os {
|
||||
case "windows":
|
||||
err = ApplyWindowsConf(confPath)
|
||||
_ = ApplyWindowsConf(confPath)
|
||||
default:
|
||||
err = ApplyWGQuickConf(confPath)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue