Skip to content

Commit bf4b8ef

Browse files
committed
Merge branch 'hotfix-1.0.8' into stable
2 parents a8dc78c + f405522 commit bf4b8ef

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 1.0.8
4+
- Fix an other startup bug ! whuhu
5+
36
## 1.0.7
47
- Fix startup bug
58

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/openldap
2-
VERSION = 1.0.7
2+
VERSION = 1.0.8
33

44
.PHONY: all build test tag_latest release
55

image/service/slapd/container-start.sh

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,33 @@ EOF
103103
fi
104104

105105
# start OpenLDAP
106-
echo "Starting openldap..."
106+
107+
108+
function startOpenLDAP(){
109+
110+
if [ -n "$PREVIOUS_HOSTNAME" ]; then
111+
PREVIOUS_HOSTNAME="ldap://$PREVIOUS_HOSTNAME"
112+
fi
113+
114+
#start openldap normaly
115+
echo "Starting openldap..."
116+
slapd -h "ldap://$HOSTNAME $PREVIOUS_HOSTNAME ldap://localhost ldapi:///" -u openldap -g openldap
117+
echo "[ok]"
118+
}
107119

108120
# start OpenLDAP with previous replication configuration
109121
if [ -e "$WAS_STARTED_WITH_REPLICATION" ]; then
110122

111123
. $WAS_STARTED_WITH_REPLICATION
112-
echo "127.0.0.2 $PREVIOUS_HOSTNAME" >> /etc/hosts
113124

114-
slapd -h "ldap://$HOSTNAME ldap://$PREVIOUS_HOSTNAME ldap://localhost ldapi:///" -u openldap -g openldap
115-
else
116-
#start openldap normaly
117-
slapd -h "ldap://$HOSTNAME ldap://localhost ldapi:///" -u openldap -g openldap
125+
if [ "$PREVIOUS_HOSTNAME" != "$HOSTNAME" ]; then
126+
echo "127.0.0.2 $PREVIOUS_HOSTNAME" >> /etc/hosts
127+
else
128+
PREVIOUS_HOSTNAME=""
129+
fi
118130
fi
119131

120-
echo "[ok]"
132+
startOpenLDAP
121133

122134
# set bootstrap config part 2
123135
if $BOOTSTRAP; then

0 commit comments

Comments
 (0)