diff --git a/internal/native/native.go b/internal/native/native.go index cd330e4..a631892 100644 --- a/internal/native/native.go +++ b/internal/native/native.go @@ -255,11 +255,13 @@ func patchPaths(dir string) { exec.Command("bash", "-c", fmt.Sprintf("find %s -type f \\( -name '*.sh' -o -name '*.list' -o -name '*.conf' -o -name '*.yaml' -o -name '*.yml' -o -name '*.json' \\) -exec sed -i 's|%s|%s|g' {} +", dir, old, dir)).Run() - // Unique internal ports per instance + // Unique internal ports + wcli config-file per instance offset := hashPort(filepath.Base(filepath.Dir(dir))) exec.Command("bash", "-c", - fmt.Sprintf("find %s -type f \\( -name '*.yaml' -o -name '*.yml' -o -name '*.conf' \\) -exec sed -i 's|:3313|:%d|g; s|:6388|:%d|g; s|:9001|:%d|g; s|:8088|:%d|g; s|:9667|:%d|g' {} +", - dir, 3313+offset, 6388+offset, 9001+offset, 8088+offset, 9667+offset)).Run() + fmt.Sprintf("find %s -type f \\( -name '*.yaml' -o -name '*.yml' -o -name '*.conf' \\) -exec sed -i 's|:3313|:%d|g; s|:6388|:%d|g; s|:9001|:%d|g; s|:8088|:%d|g; s|:9667|:%d|g' {} + ; "+ + "find %s -name '*.conf' -exec sed -i 's|\\(wcli run\\)$|\\1 --config-file %s/etc/wallarm/node.yaml|' {} +", + dir, 3313+offset, 6388+offset, 9001+offset, 8088+offset, 9667+offset, + dir, dir)).Run() } func hashPort(s string) int {