NULL again fup

This commit is contained in:
2025-07-22 11:58:42 +02:00
parent 9def497c83
commit 08cc4374e6

View File

@ -81,6 +81,10 @@ else
echo "Primary host is : ${primaryHost}, port: ${primaryPort}"
currentHost=$(hostname -f)
echo "Current host is : ${currentHost}"
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
@ -89,6 +93,7 @@ else
startPrimary=1
fi
fi
fi
if [ "${startPrimary}" -eq 1 ]; then
echo "Starting Valkey as primary"