The supreme judicial court and the superior courts shall have jurisdiction in equity upon the petition of the department, the attorney general, or any city or town or an 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 of the department, or any provisio