Such hearing shall be held after due and personal notice thereof has been given, in such manner as the court shall direct, to all known persons against whom relief is sought, and also to the chief of those public officials of the county and city within which the unlawful acts have been threatened or committed charged with the duty to protect complainant’s property: Provided, however, That if a complainant shall also allege that, unless a temporary restraining order shall be issued without notice, a substantial and irreparable injury to complainant’s property will be unavoidable, such a temporary restraining order may be issued upon testimony under oath, sufficient, if sustained, to justify the court in issuing a temporary injunction upon a hearing after notice. Such a temporary restraining order shall be effective for no longer than five days and shall become void at the expiration of said five days. No temporary restraining order or temporary injunction shall be issued except on condition that complainant shall first file an undertaking with adequate security in an amount to be fixed by the court sufficient to recompense those enjoined for any loss, expense, or damage caused by the improvident or erroneous issuance of such order or injunction, including all reasonable costs (together with a reasonable attorney’s fee) and expense of defense against the order or against the granting of any injunctive relief sought in the same proceeding and subsequently denied by the court.
The undertaking mentioned in this section shall be understood to signify an agreement entered into by the complainant and the surety upon which a decree may be rendered in the same suit or proceeding against said complainant and surety, upon a hearing to assess damages of which hearing complainant and surety shall have reasonable notice, the said complainant and surety submitting themselves to the jurisdiction of the court for that purpose. But nothing in this section contained shall deprive any party having a claim or cause of action under or upon such undertaking from electing to pursue his ordinary remedy by suit at law or in equity.