If any member of the police department of any such city shall, while in the performance of his duty and not otherwise, become and be found upon examination by a medical officer selected by such board and authorized by said applicant, to be physically or mentally permanently disabled by reason of service in such department, so as to render necessary his retirement from service from said department, said board of trustees may, if it finds such applicant is entitled to be pensioned, pay the said disabled member from said pension fund the sum equal to one-half the average monthly rate of salary which such member shall have received on said force during three years immediately preceding the date of his retirement; except, if such member shall have served less than three years in said department, the average monthly rate of salary shall be computed by the board of trustees. On the other hand, if said physician or physicians shall find the applicant is disabled from further service from disease contracted or injuries sustained outside of the services of the police department then said applicant shall be permitted to receive as a refund the amount he would receive under section 86.523 if he should be dismissed or resign from the police department; provided, that any pension granted to any member of such pension fund for disability provided in this section shall cease if such member shall recover from said disability, provided such member shall be restored to active duty in such force, the said board of trustees to be at all times the final authority in determining all matters pertaining to the granting or termination of the pensions, refunds, or allowances, awarded as provided for in this section.