24 lines
681 B
Bash
Executable File
24 lines
681 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
# set -x (bash debug) if log level is trace
|
|
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/log-helper
|
|
log-helper level eq trace && set -x
|
|
|
|
www_data_homedir=$( getent passwd "www-data" | cut -d: -f6 )
|
|
|
|
FIRST_START_DONE="${CONTAINER_STATE_DIR}/docker-ldap-client-first-start-done"
|
|
# container first start
|
|
if [ ! -e "$FIRST_START_DONE" ]; then
|
|
|
|
if [ "${PHPLDAPADMIN_LDAP_CLIENT_TLS,,}" == "true" ]; then
|
|
|
|
echo "TLS_REQCERT $PHPLDAPADMIN_LDAP_CLIENT_TLS_REQCERT" >> /etc/ldap/ldap.conf
|
|
echo "TLS_CACERT /etc/ssl/certs/$PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME" >> /etc/ldap/ldap.conf
|
|
|
|
fi
|
|
|
|
touch $FIRST_START_DONE
|
|
|
|
fi
|
|
|
|
exit 0 |