mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-28 21:06:01 +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.
|
// initTelemetry initializes the telemetry engine.
|
||||||
func initTelemetry() error {
|
func initTelemetry() error {
|
||||||
uuidFilename := filepath.Join(caddy.AssetsPath(), "uuid")
|
uuidFilename := filepath.Join(caddy.AssetsPath(), "uuid")
|
||||||
|
if customUUIDFile := os.Getenv("CADDY_UUID_FILE"); customUUIDFile != "" {
|
||||||
|
uuidFilename = customUUIDFile
|
||||||
|
}
|
||||||
|
|
||||||
newUUID := func() uuid.UUID {
|
newUUID := func() uuid.UUID {
|
||||||
id := uuid.New()
|
id := uuid.New()
|
||||||
|
|
Loading…
Reference in a new issue