From f058419042c720f6634428c0ee7e4705efa9b732 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 15 May 2018 19:39:15 -0600 Subject: [PATCH] Change UUID file with CADDY_UUID_FILE environment variable --- caddy/caddymain/run.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/caddy/caddymain/run.go b/caddy/caddymain/run.go index 4c8adcb4f..9a19ed05b 100644 --- a/caddy/caddymain/run.go +++ b/caddy/caddymain/run.go @@ -342,6 +342,9 @@ func detectContainer() bool { // initTelemetry initializes the telemetry engine. func initTelemetry() error { uuidFilename := filepath.Join(caddy.AssetsPath(), "uuid") + if customUUIDFile := os.Getenv("CADDY_UUID_FILE"); customUUIDFile != "" { + uuidFilename = customUUIDFile + } newUUID := func() uuid.UUID { id := uuid.New()