If the person to whom such writ is directed cannot be found or shall refuse admittance to the sheriff, the same may be served by leaving it at the residence of the person to whom it is directed, or by posting the same in some conspicuous place, either on his or her dwelling house or where the party is confined or under restraint.