From 41c2139ad6a82ce5ecb5df3cd2e96970c67389fb Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Mon, 17 Aug 2026 12:18:40 +0200 Subject: [PATCH] Add multi-connection NC Connector runner --- runtime/run-all.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 runtime/run-all.sh diff --git a/runtime/run-all.sh b/runtime/run-all.sh new file mode 100644 index 0000000..04434b7 --- /dev/null +++ b/runtime/run-all.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +CONFIG_DIR="/etc/bratonien-tools/nc-connector" +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +shopt -s nullglob +configs=("$CONFIG_DIR"/connection-*.conf) + +if [[ ${#configs[@]} -eq 0 ]]; then + echo "Keine aktiven NC-Connector-Verbindungen konfiguriert." + exit 0 +fi + +result=0 +for config in "${configs[@]}"; do + echo "NC Connector: $(basename "$config")" + if ! env PIWIGO_CONFIG="$config" "$SCRIPT_DIR/sync.sh"; then + result=1 + fi +done + +exit "$result"