composition.shouldBeSyncedByThisHost() extended to composition.shouldBeSyncedByGivenHost() to enable check in sync-send.sh

This commit is contained in:
m8in
2026-06-19 23:14:36 +02:00
parent ffebc8c66e
commit 86be20d2bd
3 changed files with 25 additions and 19 deletions
+3 -3
View File
@@ -161,7 +161,7 @@ function receiveLoopSingle() {
_COMPOSITION="${1:?"receiveLoopSingle(): Missing first parameter COMPOSITION"}"
readonly _COMPOSITION
while composition.shouldBeSyncedByThisHost "${_COMPOSITION}"; do
while composition.shouldBeSyncedByGivenHost "${_COMPOSITION}" "${CIS[HOST]}"; do
receive "${_COMPOSITION}" \
&& echo "Sleep for 5s" \
&& sleep 5 \
@@ -175,7 +175,7 @@ function receiveLoopSingle() {
return 1
done
! composition.shouldBeSyncedByThisHost "${_COMPOSITION}" \
! composition.shouldBeSyncedByGivenHost "${_COMPOSITION}" "${CIS[HOST]}" \
&& echo "This host '${CIS[HOST]}' is no sync-host (anymore) for composition: '${_COMPOSITION}'"
}
@@ -194,7 +194,7 @@ function receiveOnceSingle() {
_COMPOSITION="${1:?"receiveOnceSingle(): Missing first parameter COMPOSITION"}"
readonly _COMPOSITION
! composition.shouldBeSyncedByThisHost "${_COMPOSITION}" \
! composition.shouldBeSyncedByGivenHost "${_COMPOSITION}" "${CIS[HOST]}" \
&& echo "This host '${CIS[HOST]}' is no sync-host for composition: '${_COMPOSITION}'" \
&& return 1