The supreme judicial and superior courts shall have jurisdiction in equity upon the petition of the department, 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 advertising device erected or maintained in violation of any rule, or regulation, or any provisions of this chapter and to