Commit 496e3b2e authored by Joseph A. Lutz's avatar Joseph A. Lutz

change the LDAP bing password through and env variable

Signed-off-by: 's avatarJoseph A. Lutz <joseph.lutz@novatechweb.com>
parent c17e4ec9
......@@ -13,12 +13,13 @@ set -e
# ************************************************************
# environment variables
# ************************************************************
# MANTISBT_HOSTNAME : Sets the hostname in the apache2 config
# MANTISBT_DB_DB_NAME : MANTISBT_DB_DB_NAME, MANTISBT_DB_ENV_MYSQL_DATABASE | MANTISBT_DB_ENV_POSTGRES_DB, config_inc.php ( $g_database_name )
# MANTISBT_DB_USER : MANTISBT_DB_USER, MANTISBT_DB_ENV_MYSQL_USER | MANTISBT_DB_ENV_POSTGRES_USER, config_inc.php ( $g_db_username )
# MANTISBT_DB_PASSWORD : MANTISBT_DB_PASSWORD, MANTISBT_DB_ENV_MYSQL_PASSWORD | MANTISBT_DB_ENV_POSTGRES_PASSWORD, config_inc.php ( $g_db_password )
# MANTISBT_HOSTNAME : Sets the hostname in the apache2 config
# MANTISBT_DB_DB_NAME : MANTISBT_DB_DB_NAME, MANTISBT_DB_ENV_MYSQL_DATABASE | MANTISBT_DB_ENV_POSTGRES_DB, config_inc.php ( $g_database_name )
# MANTISBT_DB_USER : MANTISBT_DB_USER, MANTISBT_DB_ENV_MYSQL_USER | MANTISBT_DB_ENV_POSTGRES_USER, config_inc.php ( $g_db_username )
# MANTISBT_DB_PASSWORD : MANTISBT_DB_PASSWORD, MANTISBT_DB_ENV_MYSQL_PASSWORD | MANTISBT_DB_ENV_POSTGRES_PASSWORD, config_inc.php ( $g_db_password )
# MANTISBT_MAIL_USER : MANTISBT_MAIL_USER, config_inc.php ( $g_smtp_username )
# MANTISBT_MAIL_PASSWORD : MANTISBT_MAIL_PASSWORD, config_inc.php ( $g_smtp_password )
# MANTISBT_LDAP_PASSWORD : MANTISBT_LDAP_PASSWORD, config_inc.php ( $g_ldap_bind_passwd )
if [[ ! -z "${MANTISBT_DB_ENV_MYSQL_VERSION}" ]]; then
MANTISBT_DB_DB_NAME=${MANTISBT_DB_DB_NAME:-${MANTISBT_DB_ENV_MYSQL_DATABASE}}
......@@ -91,6 +92,9 @@ update_config_inc() {
if [[ ! -z "${MANTISBT_MAIL_PASSWORD}" ]] && grep -q 'g_smtp_password' ${MANTISBT_BASE_DIR}/config_inc.php ; then \
sed -i 's|$g_smtp_password\( *= \).*|$g_smtp_password\1'"'${MANTISBT_MAIL_PASSWORD}'"';|' ${MANTISBT_BASE_DIR}/config_inc.php
fi
if [[ ! -z "${MANTISBT_LDAP_PASSWORD}" ]] && grep -q 'g_ldap_bind_passwd' ${MANTISBT_BASE_DIR}/config_inc.php ; then \
sed -i 's|$g_ldap_bind_passwd\( *= \).*|$g_ldap_bind_passwd\1'"'${MANTISBT_LDAP_PASSWORD}'"';|' ${MANTISBT_BASE_DIR}/config_inc.php
fi
fi
# uploads are not configured by default. Make a directory for where uploads are located
mkdir -p /var/www/html/uploads
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment