Sec. 8-12. Procedure when regulations are violated. If any building or structure has been erected, constructed, altered, converted or maintained, or any building, structure or land has been used, in violation of any provision of this chapter or of any bylaw, ordinance, rule or regulation made under authority conferred hereby, any official having jurisdiction, in addition to other remedies, may institute an action or proceeding to prevent such unlawful erection, construction, alteration, conversion, maintenance or use or to restrain, correct or abate such violation or to prevent the occupancy of such building, structure or land or to prevent any illegal act, conduct, business or use in or about such premises. Such regulations shall be enforced by the officer or official board or authority designated therein, who shall be authorized to cause any building, structure, place or premises to be inspected and examined and to order in writing the remedying of any condition found to exist therein or thereon in violation of any provision of the regulations made under authority of the provisions of this chapter or, when the violation involves grading of land, the removal of earth or soil erosion and sediment control, to issue, in writing, a cease and desist order to be effective immediately. The owner or agent of any building or premises where a violation of any provision of such regulations has been committed or exists, or the lessee or tenant of an entire building or entire premises where such violation has been committed or exists, or the owner, agent, lessee or tenant of any part of the building or premises in which such violation has been committed or exists, or the agent, architect, builder, contractor or any other person who commits, takes part or assists in any such