mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-15 23:36:26 +03:00
Change UUID file with CADDY_UUID_FILE environment variable
This commit is contained in:
parent
13268db536
commit
f058419042
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue