diff options
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 1dd45f0f77..4a231c1a52 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -111,6 +111,7 @@ var ( LandingPageURL LandingPage UnixSocketPermission uint32 EnablePprof bool + PprofDataPath string SSH = struct { Disabled bool `ini:"DISABLE_SSH"` @@ -775,6 +776,10 @@ func NewContext() { AppDataPath = sec.Key("APP_DATA_PATH").MustString(path.Join(AppWorkPath, "data")) EnableGzip = sec.Key("ENABLE_GZIP").MustBool() EnablePprof = sec.Key("ENABLE_PPROF").MustBool(false) + PprofDataPath = sec.Key("PPROF_DATA_PATH").MustString(path.Join(AppWorkPath, "data/tmp/pprof")) + if !filepath.IsAbs(PprofDataPath) { + PprofDataPath = filepath.Join(AppWorkPath, PprofDataPath) + } switch sec.Key("LANDING_PAGE").MustString("home") { case "explore": |