diff --git a/internal/native/native.go b/internal/native/native.go index e8a2f3a..c2f0632 100644 --- a/internal/native/native.go +++ b/internal/native/native.go @@ -258,10 +258,17 @@ func killPort(port string) { } func patchPaths(dir string) { - exec.Command("sed", "-i", fmt.Sprintf("s|/opt/wallarm|%s|g", dir), + old := "/opt/wallarm" + // env.list (PATH, LD_LIBRARY_PATH) + exec.Command("sed", "-i", fmt.Sprintf("s|%s|%s|g", old, dir), filepath.Join(dir, "env.list")).Run() + // shell scripts exec.Command("find", dir, "-name", "*.sh", "-exec", - "sed", "-i", fmt.Sprintf("s|/opt/wallarm|%s|g", dir), "{}", ";").Run() - exec.Command("sed", "-i", fmt.Sprintf("s|/opt/wallarm|%s|g", dir), + "sed", "-i", fmt.Sprintf("s|%s|%s|g", old, dir), "{}", ";").Run() + // supervisord config + exec.Command("sed", "-i", fmt.Sprintf("s|%s|%s|g", old, dir), filepath.Join(dir, "etc", "supervisord.conf")).Run() + // wstore config + exec.Command("sed", "-i", fmt.Sprintf("s|%s|%s|g", old, dir), + filepath.Join(dir, "wstore", "wstore.yaml")).Run() }