Where the office of the sheriff is vacant, the chief deputy sheriff or undersheriff if designated by the sheriff to fill the vacancy, or, if no designation is made, the coroner of the county shall perform all the duties required by law to be performed by the sheriff, and have the same powers, and be liable to the same penalties and proceedings as if he were sheriff, until another sheriff is elected or appointed and qualified. The designation shall be in writing and filed with the county clerk.
55 ILCS 5/3-3010