Such board shall have the general powers and duties set forth in subdivision (5) of this section. (c) Whenever, after July first, nineteen hundred and fourteen, any city or town, except the city of Boston, retires a teacher who is not eligible for a pension payable by the teachers??? retirement system under the provisions of sections one to twenty-eight, inclusive, or under corresponding provision