From fa31e236357264f89ad32c22125186cb5e696e2a Mon Sep 17 00:00:00 2001
From: Copilot <198982749+Copilot@users.noreply.github.com>
Date: Wed, 06 May 2026 17:52:12 +0000
Subject: [PATCH] Fix shell script issues in opendj-docker/run.sh (#640)

---
 opendj-packages/opendj-docker/run.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/opendj-packages/opendj-docker/run.sh b/opendj-packages/opendj-docker/run.sh
index 34bd260..b79e4e6 100755
--- a/opendj-packages/opendj-docker/run.sh
+++ b/opendj-packages/opendj-docker/run.sh
@@ -29,11 +29,11 @@
   mkdir -p /opt/opendj/data/lib/extensions
 fi
 
-# Instance dir does exist? We start opendj whithout detach
+# Instance dir does exist? We start opendj without detach
 if [ -d ./data/config ]; then
   sh ./upgrade -n
   exec ./bin/start-ds --nodetach
-  return
+  exit
 fi
 
 # If we are here, opendj is not installed & we need to run setup
@@ -49,7 +49,7 @@
 sh "${BOOTSTRAP}"
 
 # Check if OPENDJ_REPLICATION_TYPE var is set. If it is - replicate to that server
-if [ ! -z ${MASTER_SERVER} ] && [ ! -z ${OPENDJ_REPLICATION_TYPE} ]; then
+if [ -n "${MASTER_SERVER}" ] && [ -n "${OPENDJ_REPLICATION_TYPE}" ]; then
   /opt/opendj/bootstrap/replicate.sh
 fi
 

--
Gitblit v1.10.0