Build WebDAV shadow trees before productive Piwigo sync

This commit is contained in:
Terranom674
2026-08-18 21:45:04 +02:00
parent dbedb83c14
commit 0d81d83d12

View File

@@ -29,6 +29,20 @@ if [[ ${#configs[@]} -eq 0 && ${#webdav_configs[@]} -eq 0 ]]; then
fi fi
result=0 result=0
# WebDAV zuerst: Der parallele Shadow Tree muss bereits vollständig stehen,
# bevor der weiterhin produktive lokale Weg seine normale Piwigo-
# Dateisynchronisierung ausführt. So wird der neue Baum im selben Minutenlauf
# sichtbar, ohne dass der WebDAV-Zweig selbst eine zweite globale Piwigo-
# Synchronisierung startet.
for config in "${webdav_configs[@]}"; do
name="$(basename "$config")"
echo "NC Connector WebDAV parallel: $name"
if ! env PIWIGO_CONFIG="$config" bash "$SCRIPT_DIR/sync-webdav.sh"; then
result=1
fi
done
for config in "${configs[@]}"; do for config in "${configs[@]}"; do
name="$(basename "$config")" name="$(basename "$config")"
connection_id="" connection_id=""
@@ -61,12 +75,4 @@ for config in "${configs[@]}"; do
fi fi
done done
for config in "${webdav_configs[@]}"; do
name="$(basename "$config")"
echo "NC Connector WebDAV parallel: $name"
if ! env PIWIGO_CONFIG="$config" bash "$SCRIPT_DIR/sync-webdav.sh"; then
result=1
fi
done
exit "$result" exit "$result"