summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/main.go b/cmd/main.go
index 14408fa..deac87f 100644
--- a/cmd/main.go
+++ b/cmd/main.go
@@ -361,6 +361,11 @@ func loadEnvFromFile(envFile string) error {
}
}
+ // Update the storage paths to ensure they have the proper
+ // value after loading a specified env file.
+ caddy.ConfigAutosavePath = filepath.Join(caddy.AppConfigDir(), "autosave.json")
+ caddy.DefaultStorage = &certmagic.FileStorage{Path: caddy.AppDataDir()}
+
return nil
}