diff --git a/servercfg/serverconf.go b/servercfg/serverconf.go index 1b7c1815..4bdd8e40 100644 --- a/servercfg/serverconf.go +++ b/servercfg/serverconf.go @@ -600,3 +600,13 @@ func GetMQServerPort() string { } return port } + +func GetMqAdminPassword() string { + password := "" + if os.Getenv("MQ_ADMIN_PASSWORD") != "" { + password = os.Getenv("MQ_ADMIN_PASSWORD") + } else if config.Config.Server.MQAdminPassword != "" { + password = config.Config.Server.MQAdminPassword + } + return password +}