Install opens up COMFY_DIR for the sandboxed service: ACL grant on Windows, BindPaths on Linux

This commit is contained in:
mram
2026-09-21 21:30:35 +02:00
parent be0bb36317
commit 9589e58ce6
6 changed files with 81 additions and 25 deletions
+16
View File
@@ -45,3 +45,19 @@ func writeEnvFile(path, content string) error {
}
return nil
}
// configuredValue reads one key from the env file the service will load, so
// the installers can adapt the sandbox to it (ACL grants, unit directives).
// "" when unset or unreadable.
func configuredValue(configPath, key string) string {
f, err := os.Open(configPath)
if err != nil {
return ""
}
defer f.Close()
values, err := config.ParseEnvFile(f)
if err != nil {
return ""
}
return values[key]
}