(a) Unless otherwise provided in the terms of the trust instrument, a trustee may resign without court approval by giving at least thirty days' notice in writing to the grantor, if living, all of the qualified beneficiaries, and all cotrustees, if any.
(b) A trustee may resign with the approval of the court having jurisdiction of the trust upon the filing of a petition for such purpose which joins as respondents the grantor, if living, all of the qualified beneficiaries, and all cotrustees, if any. In approving a resignation, the court may issue orders and impose conditions reasonably necessary for the protection of the trust property.
(c) Unless otherwise provided by order of the court, any liability of a resigning trustee or of any sureties on the trustee's bond for acts or omissions of the trustee is not discharged or affected by the trustee's resignation.