Browse Source

version updates

0xdcarns 3 years ago
parent
commit
41401cfb58
2 changed files with 16 additions and 34 deletions
  1. 1 1
      netclient/main.go
  2. 15 33
      servercfg/serverconf.go

+ 1 - 1
netclient/main.go

@@ -18,7 +18,7 @@ func main() {
 	app := cli.NewApp()
 	app.Name = "Netclient CLI"
 	app.Usage = "Netmaker's netclient agent and CLI. Used to perform interactions with Netmaker server and set local WireGuard config."
-	app.Version = "v0.10.0"
+	app.Version = "v0.9.4"
 
 	cliFlags := cli_options.GetFlags(ncutils.GetHostname())
 	app.Commands = cli_options.GetCommands(cliFlags[:])

+ 15 - 33
servercfg/serverconf.go

@@ -113,7 +113,7 @@ func GetAPIConnString() string {
 
 // GetVersion - version of netmaker
 func GetVersion() string {
-	version := "0.10.0"
+	version := "0.9.4"
 	if config.Config.Server.Version != "" {
 		version = config.Config.Server.Version
 	}
@@ -244,18 +244,6 @@ func GetGRPCPort() string {
 	return grpcport
 }
 
-// GetMessageQueueEndpoint - gets the message queue endpoint
-func GetMessageQueueEndpoint() string {
-	host, _ := GetPublicIP()
-	if os.Getenv("MQ_HOST") != "" {
-		host = os.Getenv("MQ_HOST")
-	} else if config.Config.Server.MQHOST != "" {
-		host = config.Config.Server.MQHOST
-	}
-	//Do we want MQ port configurable???
-	return host + ":1883"
-}
-
 // GetMasterKey - gets the configured master key of server
 func GetMasterKey() string {
 	key := "secretkey"
@@ -319,29 +307,23 @@ func IsAgentBackend() bool {
 	return isagent
 }
 
-// IsMessageQueueBackend - checks if message queue is on or off
-func IsMessageQueueBackend() bool {
-	ismessagequeue := true
-	if os.Getenv("MESSAGEQUEUE_BACKEND") != "" {
-		if os.Getenv("MESSAGEQUEUE_BACKEND") == "off" {
-			ismessagequeue = false
-		}
-	} else if config.Config.Server.MessageQueueBackend != "" {
-		if config.Config.Server.MessageQueueBackend == "off" {
-			ismessagequeue = false
-		}
-	}
-	return ismessagequeue
-}
-
 // IsClientMode - checks if it should run in client mode
 func IsClientMode() string {
 	isclient := "on"
-	if os.Getenv("CLIENT_MODE") == "off" {
-		isclient = "off"
-	}
-	if config.Config.Server.ClientMode == "off" {
-		isclient = "off"
+	if os.Getenv("CLIENT_MODE") != "" {
+		if os.Getenv("CLIENT_MODE") == "off" {
+			isclient = "off"
+		}
+		if os.Getenv("CLIENT_MODE") == "contained" {
+			isclient = "contained"
+		}
+	} else if config.Config.Server.ClientMode != "" {
+		if config.Config.Server.ClientMode == "off" {
+			isclient = "off"
+		}
+		if config.Config.Server.ClientMode == "contained" {
+			isclient = "contained"
+		}
 	}
 	return isclient
 }