|
31 | 31 |
|
32 | 32 | a2ensite phpldapadmin | log-helper debug |
33 | 33 |
|
34 | | - |
35 | 34 | FIRST_START_DONE="${CONTAINER_STATE_DIR}/docker-phpldapadmin-first-start-done" |
36 | 35 | # container first start |
37 | 36 | if [ ! -e "$FIRST_START_DONE" ]; then |
@@ -87,34 +86,34 @@ if [ ! -e "$FIRST_START_DONE" ]; then |
87 | 86 | do |
88 | 87 | if [ $(complex-bash-env isRow "${!info}") = true ]; then |
89 | 88 | local key=$(complex-bash-env getRowKey "${!info}") |
90 | | - local value=$(complex-bash-env getRowValue "${!info}") |
| 89 | + local valueVarName=$(complex-bash-env getRowValueVarName "${!info}") |
91 | 90 |
|
92 | | - if [ $(complex-bash-env isTable "$value") = true ] || [ $(complex-bash-env isRow "$value") = true ]; then |
93 | | - host_info "$to_print'$key'," "${value}" |
| 91 | + if [ $(complex-bash-env isTable "${!valueVarName}") = true ] || [ $(complex-bash-env isRow "${!valueVarName}") = true ]; then |
| 92 | + host_info "$to_print'$key'," "${valueVarName}" |
94 | 93 | else |
95 | | - append_value_to_file "$to_print'$key'," "$value" |
| 94 | + append_value_to_file "$to_print'$key'," "${!valueVarName}" |
96 | 95 | fi |
97 | 96 | fi |
98 | 97 | done |
99 | 98 | } |
100 | 99 |
|
101 | 100 | # phpLDAPadmin config |
102 | | - for host in $(complex-bash-env iterate "${PHPLDAPADMIN_LDAP_HOSTS}") |
| 101 | + for host in $(complex-bash-env iterate PHPLDAPADMIN_LDAP_HOSTS) |
103 | 102 | do |
104 | 103 |
|
105 | 104 | append_to_file "\$servers->newServer('ldap_pla');" |
106 | 105 |
|
107 | 106 | if [ $(complex-bash-env isRow "${!host}") = true ]; then |
108 | 107 | hostname=$(complex-bash-env getRowKey "${!host}") |
109 | | - info=$(complex-bash-env getRowValue "${!host}") |
| 108 | + info=$(complex-bash-env getRowValueVarName "${!host}") |
110 | 109 |
|
111 | 110 | append_to_file "\$servers->setValue('server','name','$hostname');" |
112 | 111 | append_to_file "\$servers->setValue('server','host','$hostname');" |
113 | 112 | host_info "" "$info" |
114 | 113 |
|
115 | 114 | else |
116 | | - append_to_file "\$servers->setValue('server','name','${host}');" |
117 | | - append_to_file "\$servers->setValue('server','host','${host}');" |
| 115 | + append_to_file "\$servers->setValue('server','name','${!host}');" |
| 116 | + append_to_file "\$servers->setValue('server','host','${!host}');" |
118 | 117 | fi |
119 | 118 | done |
120 | 119 |
|
|
0 commit comments