Unless otherwise provided by special act or charter, all other town officers shall be appointed as provided by law and, if no other provision for their appointment is made by law, then (i) by the chief executive officer of such municipality, (ii) where the legislative body is a town meeting, by the board of selectmen, or (iii) by such other appointing authority as a town may by ordinance provide,