Skip to content

Commit

Permalink
Update bdii-slapd-start
Browse files Browse the repository at this point in the history
If both ipv6 and ipv4 addresses are being used the systemd script breaks because of quotes in the options. This is the fix.
  • Loading branch information
VilleS1 authored Nov 8, 2023
1 parent 9da1e59 commit 09014e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions etc/systemd/bdii-slapd-start
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DELAYED_DELETE=${DELAYED_DELETE:-${BDII_VAR_DIR}/delayed_delete.pkl}
BDII_RAM_SIZE=${BDII_RAM_SIZE:-1500M}

if [ "${BDII_IPV6_SUPPORT}" == "yes" ]; then
SLAPD_HOST_STRING="'ldap://${SLAPD_HOST}:${SLAPD_PORT} ldap://[${SLAPD_HOST6}]:${SLAPD_PORT}'"
SLAPD_HOST_STRING="\"ldap://${SLAPD_HOST}:${SLAPD_PORT} ldap://[${SLAPD_HOST6}]:${SLAPD_PORT}\""
else
SLAPD_HOST_STRING="ldap://${SLAPD_HOST}:${SLAPD_PORT}"
fi
Expand Down Expand Up @@ -75,6 +75,6 @@ else
fi
fi

COMMAND="${SLAPD} -f ${SLAPD_CONF} -h ${SLAPD_HOST_STRING} -u ${BDII_USER}"
exec ${COMMAND}
COMMAND=(/bin/bash -c "$SLAPD -f $SLAPD_CONF -h $SLAPD_HOST_STRING -u $BDII_USER")
exec "${COMMAND[@]}"

0 comments on commit 09014e9

Please sign in to comment.