Sauce: In medium saucepan combine ketchup, onion, honey, vinegar, bourbon or water, mustard, lemon juice, thyme, garlic and red pepper flakes. Bring to a boil. Reduce heat and simmer, uncovered, for 10-15 minutes or until desired consistency, stirring frequently. Divide sauce into two portions; set aside.
Ham:At least 1 hour before grilling, soak wood chips in enough water to cover; drain before using. In charcoal grill with cover, place preheated coals around a drip pan for medium-low indirect heat. Sprinkle half of the wood chips over the coals. Place ham on the grill rack over drip pan. Cover and grill for 2 to 2 1/2 hours, until internal temperature (measured with a meat thermometer) is 140 degrees F., basting with one portion of sauce the last 15 minutes. Add more preheated coals (use a hibachi or a metal chimney starter to preheat coals) and wood chips halfway through grilling. Remove ham from grill. Cover and let rest for 15 minutes before slicing. Reheat second portion of sauce and serve with ham.
* Note: For gas grills, preheat and then turn off any burners directly below where the food will go. The heat circulates inside the grill, so turning the food is not necessary.