From e630a1f3697baee40dd63687153dc095a71ac028 Mon Sep 17 00:00:00 2001 From: Ivan Vandot Date: Fri, 29 Sep 2023 11:38:34 +0200 Subject: [PATCH] minor fixes --- charts/bee/templates/statefulset.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/bee/templates/statefulset.yaml b/charts/bee/templates/statefulset.yaml index 8406c92..0cc760a 100644 --- a/charts/bee/templates/statefulset.yaml +++ b/charts/bee/templates/statefulset.yaml @@ -120,8 +120,8 @@ spec: - > if [ -f /home/bee/.bee/keys/swarm.key ]; then echo 'initial overlay already mined'; exit 0; fi; NEIGH=$(wget -T 2 https://api.swarmscan.io/v1/network/neighborhoods/suggestion -q -O - | grep -Eoi '"neighborhood":"([0,1]{10}),?[^\\]' | grep -Eoi '[0,1]{10}'); - if [ ! "${NEIGH}" =~ ^[0,1]{10}$ ]; then echo 'bad neighborhood value ' "${NEIGH}" ; exit 1; fi; - if [ ! -f /home/bee/.bee.yaml ]; then cp -p /tmp/.bee.yaml /home/bee/.bee.yaml; fi; + if ! [[ "${NEIGH}" =~ ^[0,1]{10}$ ]]; then echo 'bad neighborhood value ' "${NEIGH}" ; exit 1; fi; + if ! [ -f /home/bee/.bee.yaml ]; then cp -p /tmp/.bee.yaml /home/bee/.bee.yaml; fi; printf 'target-neighborhood: %s\n' "${NEIGH}" >> /home/bee/.bee.yaml; echo 'node initialization done'; volumeMounts: