SLAPD_CONF="$INSTALL_ROOT/etc/openldap/slapd.conf"  &&
SLAPD_CONF_NEW="$SLAPD_CONF.new.$$"  &&

if  spell_ok  openldap  &&  [[  -r  "$SLAPD_CONF"  ]]  &&  !  grep  -q  'horde.schema'  "$SLAPD_CONF"; then
  gawk  -f  "$SCRIPT_DIRECTORY/addschema.gawk"  "$SLAPD_CONF"  >  "$SLAPD_CONF_NEW"  &&
  slaptest  -f  "$SLAPD_CONF_NEW"  -u  &&
  cat  "$SLAPD_CONF_NEW"  >  "$SLAPD_CONF"  &&
  rm  -f  "$SLAPD_CONF_NEW"  &&
  message  "${MESSAGE_COLOR}Horde schema added to $SLAPD_CONF; restart slapd...${DEFAULT_COLOR}"
fi
