In case any building or structure is erected, constructed, reconstructed, altered, repaired, moved, converted or maintained, or any building, structure or land is used in violation of this chapter or of any regulation made pursuant thereto, any appropriate action or proceeding, whether in law, equity or otherwise, may be commenced to restrain, correct or abate such violation.