mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-23 00:17:10 +08:00
adding telemetry
This commit is contained in:
@@ -85,6 +85,7 @@ func GetServerConfig() config.ServerConfig {
|
||||
} else {
|
||||
cfg.RCE = "off"
|
||||
}
|
||||
cfg.Telemetry = Telemetry()
|
||||
|
||||
return cfg
|
||||
}
|
||||
@@ -319,6 +320,18 @@ func IsClientMode() string {
|
||||
return isclient
|
||||
}
|
||||
|
||||
// IsClientMode - checks if it should run in client mode
|
||||
func Telemetry() string {
|
||||
telemetry := "on"
|
||||
if os.Getenv("TELEMETRY") == "off" {
|
||||
telemetry = "off"
|
||||
}
|
||||
if config.Config.Server.Telemetry == "off" {
|
||||
telemetry = "off"
|
||||
}
|
||||
return telemetry
|
||||
}
|
||||
|
||||
// IsDNSMode - should it run with DNS
|
||||
func IsDNSMode() bool {
|
||||
isdns := true
|
||||
|
||||
Reference in New Issue
Block a user