(a) Whoever violates this chapter, except as otherwise therein prescribed or any regulation of the board of health made in pursuance thereof, or obstructs or interferes with the execution of any such order, or wilfully or illegally omits to obey any such order, or neglects or refuses to comply with any requirements of this chapter, except as otherwise therein prescribed shall be fined not more than $100 or imprisoned not more than 30 days, or both.
(b) No person shall be imprisoned under this section for the first offense and the prosecution shall always be as for a first offense, unless the affidavit upon which the prosecution is instituted contains the allegation that the offense is a second or a repeated offense.
(c) If such violation, obstruction, interference or omission be by a corporation, the corporation shall be subject to the fine, and any officer of such corporation having authority over the matter, and permitting such violation shall be subject to fine and imprisonment or both, as heretofore provided.