mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 11:44:31 +00:00
Add multi-connection NC Connector runner
This commit is contained in:
22
runtime/run-all.sh
Normal file
22
runtime/run-all.sh
Normal file
@@ -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"
|
||||
Reference in New Issue
Block a user