Section 7005 Service of the writ
Civil Practice Law & Rules (CVP)
A writ of habeas corpus may be served on any day. Service shall be made by delivering the writ and a copy of the petition to the person to whom it is directed. If he cannot with due diligence be found, the writ may be served by leaving it and a copy of the petition with any person who has custody of the person detained at the time. Where the person to whom the writ is directed conceals himself or refuses admittance, the writ may be served by affixing it and a copy of the petition in a conspicuous place on the outside either of his dwelling or of the place where the person is detained and mailing a copy of the writ and the petition to him at such dwelling or place, unless the court which issues the writ determines, for good cause shown, that such mailing shall be dispensed with, or directs service in some other manner which it finds reasonably calculated to give notice to such person of the proceeding. If the person detained is in the custody of a person other than the one to whom the writ is directed, a copy of the writ may be served upon the person having such custody with the same effect as if the writ had been directed to him.