Skip to content

Commit 7acb5bf

Browse files
committed
Merge branch 'timothyclarke-stable' into hotfix-0.7.2
2 parents ddb784d + 5abb107 commit 7acb5bf

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@ See how to [set your own environment variables](#set-your-own-environment-variab
172172

173173
To convert yaml to python online: http://yaml-online-parser.appspot.com/
174174

175+
If you would like to skip the display name == hostname element of the above use the **PHPLDAPADMIN_LDAP_HOSTS_FRIENDLY** environmental variable. This then uses the top most name as the display name of the server. You will then need to add host to the yaml within the server section. Note this is a global setting, if you do it for one server, you must do it for all. eg
176+
```yaml
177+
- Primary:
178+
- server:
179+
- host: ldap-master.example.org
180+
- Backup:
181+
- server:
182+
- host: 192.168.0.100
183+
```
184+
175185
Apache :
176186
- **PHPLDAPADMIN_SERVER_ADMIN**: Server admin email. Defaults to `webmaster@example.org`
177187
- **PHPLDAPADMIN_SERVER_PATH**: Server path (usefull if behind a reverse proxy). Defaults to `/phpldapadmin`

image/service/phpldapadmin/startup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ if [ ! -e "/var/www/phpldapadmin/config/config.php" ]; then
119119
hostname=$(complex-bash-env getRowKey "${!host}")
120120
info=$(complex-bash-env getRowValueVarName "${!host}")
121121

122+
if [ "${PHPLDAPADMIN_LDAP_HOSTS_FRIENDLY,,}" != "true" ]; then
123+
append_to_file "\$servers->setValue('server','host','$hostname');"
124+
fi
122125
append_to_file "\$servers->setValue('server','name','$hostname');"
123-
append_to_file "\$servers->setValue('server','host','$hostname');"
124126
host_info "" "$info"
125127

126128
else

0 commit comments

Comments
 (0)