From ac6e6eed0bb1a6166803e8d13a82fbe4a16bdd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Ramon=20Ma=C3=B1es?= Date: Fri, 23 Jun 2023 14:42:07 +0200 Subject: [PATCH] feat: multiline command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jose Ramon MaƱes --- pkg/k8s/commands.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/k8s/commands.go b/pkg/k8s/commands.go index 412d485..dde8df9 100644 --- a/pkg/k8s/commands.go +++ b/pkg/k8s/commands.go @@ -9,7 +9,8 @@ import ( var ( trustedPeerFile = "/tmp/TP-ADDR" trustedPeers = "/tmp/" - trustedPeerPrefix = "/ip4/$(ip_addr=$(ifconfig | grep -oE 'inet addr:([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)' | grep -v '127.0.0.1' | awk '{print substr($2, 6)}'))/tcp/2121/p2p/" + cmd = `$(ifconfig | grep -oE 'inet addr:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)' | grep -v '127.0.0.1' | awk '{print substr($2, 6)}')` + trustedPeerPrefix = "/ip4/" + cmd + "/tcp/2121/p2p/" ) func GetTrustedPeersPath(cfg config.MutualPeer) string {