Run WebDAV path beside existing connector runtime

This commit is contained in:
Terranom674
2026-08-18 21:25:57 +02:00
parent a550bbd01a
commit 539605b19a

View File

@@ -6,7 +6,12 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
shopt -s nullglob shopt -s nullglob
if ! php "$SCRIPT_DIR/reconcile.php"; then if ! php "$SCRIPT_DIR/reconcile.php"; then
echo "NC Connector: gespeicherte Verbindungen konnten nicht mit der Runtime abgeglichen werden." >&2 echo "NC Connector: gespeicherte lokale Verbindungen konnten nicht mit der Runtime abgeglichen werden." >&2
exit 1
fi
if ! php "$SCRIPT_DIR/reconcile-webdav.php"; then
echo "NC Connector: WebDAV-Testverbindungen konnten nicht mit der parallelen Runtime abgeglichen werden." >&2
exit 1 exit 1
fi fi
@@ -16,9 +21,10 @@ if ! php "$SCRIPT_DIR/cleanup-stale.php"; then
fi fi
configs=("$CONFIG_DIR"/connection-*.conf) configs=("$CONFIG_DIR"/connection-*.conf)
webdav_configs=("$CONFIG_DIR"/webdav-connection-*.conf)
if [[ ${#configs[@]} -eq 0 ]]; then if [[ ${#configs[@]} -eq 0 && ${#webdav_configs[@]} -eq 0 ]]; then
echo "Keine aktiven NC-Connector-Verbindungen konfiguriert." echo "Keine NC-Connector-Verbindungen konfiguriert."
exit 0 exit 0
fi fi
@@ -49,10 +55,18 @@ for config in "${configs[@]}"; do
continue continue
fi fi
echo "NC Connector: $name" echo "NC Connector lokal: $name"
if ! env PIWIGO_CONFIG="$config" bash "$SCRIPT_DIR/sync.sh"; then if ! env PIWIGO_CONFIG="$config" bash "$SCRIPT_DIR/sync.sh"; then
result=1 result=1
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"