If the sheriff shall be legally removed from his office, or shall die before the expiration of the term for which he was commissioned, the chief deputy sheriff of the county shall execute the office of sheriff and perform all things thereunto appertaining and receive the compensation provided by law for sheriffs until another sheriff is commissioned and notice thereof is given to such chief deputy sheriff.
16 P.S. § 4214