(1) At or after the hearing, the court may make such orders in respect to the conduct of the spouses and the subject matter of the controversy as the court deems necessary to preserve the marriage or to implement the reconciliation of the spouses, but in no event shall such orders be effective for more than thirty days from the hearing of the petition, unless the parties mutually consent to a continuation of such time.
(2) Any reconciliation agreement between the parties may be reduced to writing and, with the consent of the parties, a court order may be made requiring the parties to comply therewith.