Section 1. The mayor of each city, subject to confirmation by the city council, and the selectmen of each town shall annually appoint two or more fence viewers, to hold office for one year and until their successors are qualified.