The court may by injunction, on good cause shown, restrain the party in possession from doing any act to the injury of the mortgaged property during the existence of a lien or the foreclosure of a mortgage thereon, and until the expiration of the time allowed for redemption.
SDCL 21-49-22