Section 5. If, by reason of illness, absence, interest or otherwise, the sheriff is unable to perform his official duties, they shall be performed by the special sheriff, and compensation therefor, if not otherwise provided for, shall be paid by the sheriff. During a vacancy in the office of sheriff, the special sheriff, first giving bond as required of the sheriff, shall perform all the duties of the sheriff, and the deputies of the former sheriff shall continue to exercise the powers of deputy sheriffs.