If the existence of a nuisance as defined in this article is shown in any action brought under this article to the satisfaction of the court or judge, either by verified complaint or affidavit, the court or judge shall allow a temporary writ of injunction to abate and prevent the continuance or recurrence of the nuisance. On granting the temporary writ the court or judge shall require an undertaking on the part of the applicant to the effect that the applicant will pay to the defendant enjoined such damages, not exceeding an amount to be specified, as the defendant sustains by reason of the injunction if the court finally decides that the applicant was not entitled to it.
Ca. Pen. Code § 11308