chore: add ROOT_DIR environment variable, refactor

This commit is contained in:
yusing
2025-04-14 06:25:06 +08:00
parent 5cdbe81beb
commit d8eff90acc
12 changed files with 56 additions and 59 deletions

View File

@@ -59,7 +59,7 @@ func AgentCertsFilepath(host string) (filepathOut string, ok bool) {
if !isValidAgentHost(host) {
return "", false
}
return filepath.Join(common.AgentCertsBasePath, host+".zip"), true
return filepath.Join(common.CertsDir, host+".zip"), true
}
func ExtractCert(data []byte) (ca, crt, key []byte, err error) {