Section 54. The two preceding sections shall be in effect in any city which by vote of the city council or in any town which at a town meeting accepts them or has accepted corresponding provisions of earlier laws.