In the event any building is erected, constructed, altered, repaired, converted, or maintained, or any building or land is used in violation of this ordinance, the building inspector, or any appropriate town [city] authority or any person who would be damaged by such violation may institute injunction, mandamus, or other appropriate action or proceeding to prevent the violation in the case of each building or land use.