(2)The gate-keeper shall comply with all rules, regulations, directions and orders, respectively, for the time being in force regulating the persons who may be permitted ingress to and egress from and the articles which may be taken into and brought out of the jail, and, generally, the duties which he is to perform and the manner in which he is to perform.