Files
HAddons/opensearch-data1/rootfs/etc/cont-init.d/10-copy-config
2025-09-21 16:25:15 +02:00

15 lines
379 B
Plaintext

#!/command/with-contenv bash
set -euo pipefail
SRC_DIR=/rootfs-config
DST_DIR=/usr/share/opensearch/config
if [ -d "$SRC_DIR" ]; then
echo "[cont-init] Copying config snippets from $SRC_DIR to $DST_DIR"
for f in "$SRC_DIR"/*; do
base=$(basename "$f")
if [ ! -f "$DST_DIR/$base" ]; then
cp "$f" "$DST_DIR/"
echo "[cont-init] Copied $base"
fi
done
fi