diff --git a/.drone/auth1-setup.sh b/.drone/auth1-setup.sh index 5314f8b..bad9a17 100755 --- a/.drone/auth1-setup.sh +++ b/.drone/auth1-setup.sh @@ -23,6 +23,13 @@ add_fqdn_to_hosts() { # set FQDN in /etc/hosts add_fqdn_to_hosts $(get_ip_addr $(hostname)) auth1 +# I'm not sure why, but we also need to remove the hosts entry for the +# container's real hostname, otherwise slapd only looks for the principal +# ldap/ (this is with the sasl-host option) +sed -E "/\\b$(hostname)\\b/d" /etc/hosts > /tmp/hosts +cat /tmp/hosts > /etc/hosts +rm /tmp/hosts + export DEBIAN_FRONTEND=noninteractive apt update apt install -y psmisc