Section 102B. In any town of five thousand inhabitants or more which accepts this section, the board of health shall appoint a full-time inspector of health who shall devote his time to the enforcement of the laws and regulations related to public health and such other duties as may be assigned by said board. This section shall not apply to any town which has formed a district pursuant to section twenty-seven A of chapter one hundred eleven.