The sheriff, after seizing the property, shall retain possession of it until the termination of the action, unless bond and security are given in a penalty as prescribed by statute, payable to the plaintiff or complainant conditioned to abide by and perform the judgment of the court.