From 7d3bd4bfc6fbc3181eae0ea39547d50835449c40 Mon Sep 17 00:00:00 2001 From: wanghai01 Date: Fri, 14 Jul 2023 14:36:54 +0800 Subject: [PATCH] add dirs http service need Signed-off-by: wanghai01 --- cli/cli/cli.go | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/cli/cli/cli.go b/cli/cli/cli.go index 25d874b13..26a516b79 100644 --- a/cli/cli/cli.go +++ b/cli/cli/cli.go @@ -47,14 +47,16 @@ import ( type CurveAdm struct { // project layout - rootDir string - dataDir string - pluginDir string - logDir string - tempDir string - dbpath string - logpath string - config *configure.CurveAdmConfig + rootDir string + dataDir string + pluginDir string + logDir string + tempDir string + dbpath string + logpath string + httpConfPath string + httpLogPath string + config *configure.CurveAdmConfig // data pipeline in io.Reader @@ -97,6 +99,8 @@ func NewCurveAdm() (*CurveAdm, error) { pluginDir: path.Join(rootDir, "plugins"), logDir: path.Join(rootDir, "logs"), tempDir: path.Join(rootDir, "temp"), + httpConfPath: path.Join(rootDir, "http/conf"), + httpLogPath: path.Join(rootDir, "http/logs"), } err = curveadm.init() @@ -116,6 +120,8 @@ func (curveadm *CurveAdm) init() error { curveadm.pluginDir, curveadm.logDir, curveadm.tempDir, + curveadm.httpConfPath, + curveadm.httpLogPath, } for _, dir := range dirs { if err := os.MkdirAll(dir, os.ModePerm); err != nil {