Section 31. The supreme judicial and superior courts shall have jurisdiction in equity upon petition of the attorney general, of any city or town or any officer thereof, or of any interested party, to restrain the erection or maintenance of any billboard, sign or other device erected or maintained in violation of any rule, or regulation, adopted by the board under section twenty-nine, and to order the removal or abatement of such billboard, sign or device as a nuisance.