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}" echo "Primary host is : ${primaryHost}, port: ${primaryPort}"
currentHost=$(hostname -f) currentHost=$(hostname -f)
echo "Current host is : ${currentHost}" echo "Current host is : ${currentHost}"
if [ ${primaryHost} = "NULL" ]; then
echo "Not primary yet, starting as primary"
startPrimary=1
else
if [ "${primaryHost}" != "${currentHost}" ]; then if [ "${primaryHost}" != "${currentHost}" ]; then
echo "Not the primary, setting up as replica" echo "Not the primary, setting up as replica"
startPrimary=0 startPrimary=0
@ -88,6 +92,7 @@ else
echo "This is the primary" echo "This is the primary"
startPrimary=1 startPrimary=1
fi fi
fi
fi fi
if [ "${startPrimary}" -eq 1 ]; then if [ "${startPrimary}" -eq 1 ]; then