Update entrypoint.sh

This commit is contained in:
Marisa 2025-10-28 12:55:04 -04:00
parent d30bb6e3de
commit 28f606b768

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
# already INSIDE the container
# --- 1. Start slapd in the background (This is the critical part you asked about) --- # 1. Start slapd in the background
echo "Starting slapd service..." 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 & /usr/sbin/slapd -h "ldap:/// ldapi:///" -g openldap -u openldap -F /etc/ldap/slapd.d &
# Wait briefly for the service to start # Wait briefly for the service to start
@ -17,7 +17,7 @@ else
echo "OpenLDAP slapd already running with PID: $SLAPD_PID" echo "OpenLDAP slapd already running with PID: $SLAPD_PID"
fi 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), # 'exec' replaces the script process with the command (e.g., /bin/bash),
# ensuring the container stays alive as long as that command runs interactively. # ensuring the container stays alive as long as that command runs interactively.
echo "Executing: $@" echo "Executing: $@"