From 08cc4374e65dd36d3344cbf5cb692a6617e66ce6 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Tue, 22 Jul 2025 11:58:42 +0200 Subject: [PATCH] NULL again fup --- components/node/files/scripts/start-node.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/components/node/files/scripts/start-node.sh b/components/node/files/scripts/start-node.sh index 55f9a13..f7564a5 100644 --- a/components/node/files/scripts/start-node.sh +++ b/components/node/files/scripts/start-node.sh @@ -81,12 +81,17 @@ else echo "Primary host is : ${primaryHost}, port: ${primaryPort}" currentHost=$(hostname -f) echo "Current host is : ${currentHost}" - if [ "${primaryHost}" != "${currentHost}" ]; then - echo "Not the primary, setting up as replica" - startPrimary=0 - else - echo "This is the primary" + if [ ${primaryHost} = "NULL" ]; then + echo "Not primary yet, starting as primary" startPrimary=1 + else + if [ "${primaryHost}" != "${currentHost}" ]; then + echo "Not the primary, setting up as replica" + startPrimary=0 + else + echo "This is the primary" + startPrimary=1 + fi fi fi