All towns and cities in this State may provide by ordinance such rules and regulations regarding the conduct and operation of hotels, restaurants, cafes and lunch counters therein as to provide for the public health, comfort and convenience. When such rules and regulations have been established by a city or town such city or town may provide by ordinance for the punishment of all offenders against such rules and regulations within the limits provided by law. But if there is a board of health in such town or city, its approval shall first be obtained before any such rules and regulations shall be established.