From a06b8cb1b003928614eb8898b706fd29684224e9 Mon Sep 17 00:00:00 2001
From: Tobias Gesellchen <tobias@gesellix.de>
Date: Tue, 25 Oct 2022 09:03:22 +0000
Subject: [PATCH] Copy ldif configs to the correct template directory (#260)

---
 opendj-packages/opendj-docker/bootstrap/setup.sh |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/opendj-packages/opendj-docker/bootstrap/setup.sh b/opendj-packages/opendj-docker/bootstrap/setup.sh
index debc41d..c36fbe6 100755
--- a/opendj-packages/opendj-docker/bootstrap/setup.sh
+++ b/opendj-packages/opendj-docker/bootstrap/setup.sh
@@ -5,6 +5,19 @@
 
 # If any optional LDIF files are present load them
 
+# There are multiple types of ldif files.
+# This step makes plain copies.
+# See below for imports via `ldapmodify`.
+if [ -d /opt/opendj/bootstrap/config/schema/ ]; then
+  echo "Copying schema:"
+  mkdir -p /opt/opendj/template/config/schema
+  for file in /opt/opendj/bootstrap/config/schema/*; do
+    target_file="/opt/opendj/template/config/schema/$(basename -- $file)"
+    echo "Copying $file to $target_file"
+    cp "$file" "$target_file"
+  done
+fi
+
 /opt/opendj/setup \
   --cli \
   -h localhost \
@@ -21,19 +34,6 @@
   --doNotStart \
   $ADD_BASE_ENTRY #--sampleData 1
 
-# There are multiple types of ldif files.
-# This step makes plain copies.
-# See below for imports via `ldapmodify`.
-if [ -d /opt/opendj/bootstrap/config/schema/ ]; then
-  echo "Copying schema:"
-  mkdir -p /opt/opendj/config/schema
-  for file in /opt/opendj/bootstrap/config/schema/*; do
-    target_file="/opt/opendj/config/schema/$(basename -- $file)"
-    echo "Copying $file to $target_file"
-    cp $file $target_file
-  done
-fi
-
 /opt/opendj/bin/start-ds
 
 # There are multiple types of ldif files.

--
Gitblit v1.10.0