Update entrypoint.sh
This commit is contained in:
parent
d30bb6e3de
commit
28f606b768
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# --- 1. Start slapd in the background (This is the critical part you asked about) ---
|
||||
# already INSIDE the container
|
||||
# 1. Start slapd in the background
|
||||
echo "Starting slapd service..."
|
||||
|
||||
# The user's desired slapd command, running in the background (&)
|
||||
# slapd start command, running in the background (&)
|
||||
/usr/sbin/slapd -h "ldap:/// ldapi:///" -g openldap -u openldap -F /etc/ldap/slapd.d &
|
||||
|
||||
# Wait briefly for the service to start
|
||||
@ -17,7 +17,7 @@ else
|
||||
echo "OpenLDAP slapd already running with PID: $SLAPD_PID"
|
||||
fi
|
||||
|
||||
# --- 2. Execute the command passed to the container ---
|
||||
# 2. Execute the command passed to the container
|
||||
# 'exec' replaces the script process with the command (e.g., /bin/bash),
|
||||
# ensuring the container stays alive as long as that command runs interactively.
|
||||
echo "Executing: $@"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user