Section 28. And be it further enacted by this authority aforesaid, That if any person shall wilfuly and knowingly obstruct or resist the board of health or any of the members thereof, or any persons by them appointed, in the execution of the powers to them given, or in performance of duties enjoined on them by this act and the rules and regulations of the said board, such persons shall, on being thereof legally convicted, forfeit and pay a sum not exceeding five hundred dollars, to be recovered and appropriated as is hereinafter directed. And if after the expiration of the quarantine, any mariner or other person who shall have complied with the regulations hereby established, shall commit any violence on the person of a member of the board of health, or any of the officers attached to the same, for any thing done in the execution of this duty, such person shall be subject, on conviction thereof, to a fine of two hundred dollars, and shall also be sentenced to imprisonment at hard labor for any term not exceeding three years.