mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-09 03:04:57 -04:00
Change UUID file with CADDY_UUID_FILE environment variable
This commit is contained in:
parent
13268db536
commit
f058419042
@ -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…
x
Reference in New Issue
Block a user