If any sheriff enters into the active military service of the United States, the office of sheriff shall not be deemed to be vacant during the time the sheriff is in such service, and the sheriff shall designate a deputy sheriff as acting sheriff who shall perform and discharge all the duties of sheriff of such county during the time such sheriff is in the active military service of the United States, but all powers and duties of such acting sheriff as sheriff shall cease upon the discharge of the sheriff from such service or upon the termination of the term of office for which the sheriff was elected. A certificate of such designation containing the name of the designated deputy and the date of the appointment, signed and acknowledged by the sheriff, shall be filed in the office of the circuit clerk of the county on the date of the designation.
55 ILCS 5/3-6031