If at the time when any new sheriff shall have qualified and given the security required by law, the office of the former sheriff shall be executed by his under sheriff, or by a coroner of the county, such under sheriff or coroner, shall in all things comply with the preceding provisions, and shall perform the duties required of such former sheriff.