Except as otherwise provided by law, if any vacancy occurs on any town board or commission, and such board or commission has power by law to fill such vacancy but fails to do so within thirty days after it occurs, the board of selectmen or chief executive authority of such town may appoint a qualified person to fill such vacancy until the next municipal election.