§ 6313. Temporary restraining order. (a) Generally. If, on a motion for a preliminary injunction, the plaintiff shall show that immediate and irreparable injury, loss or damages will result unless the defendant is restrained before a hearing can be had, a temporary restraining order may be granted without notice. Upon granting a temporary restraining order, the court shall set the hearing for the preliminary injunction at the earliest possible time. No temporary restraining order may be granted in an action arising out of a labor dispute as defined in section eight hundred seven of the labor law, nor against a public officer, board or municipal corporation of the state to restrain the performance of statutory duties. (b) Service. Unless the court orders otherwise, a temporary restraining order together with the papers upon which it was based, and a notice of hearing for the preliminary injunction, shall be personally served in the same manner as a summons. (c) Undertaking. Prior to the granting of a temporary restraining order the court may, in its discretion, require the plaintiff to give an undertaking in an amount to be fixed by the court, containing terms similar to those set forth in subdivision (b) of rule 6312, and subject to the exception set forth therein.