A trustee may prosecute or defend actions, claims or proceedings for the protection of trust assets or of the trustee in the performance of the trustee's duties. However, a trustee has no duty to prosecute, or to defend or continue to defend the trust or its assets in any action, through exercise of judicial process or otherwise, to reach the assets of the trust in satisfaction of a claim against the trust, a beneficiary or the settlor of a trust unless:
Unless otherwise provided in the trust agreement, a trustee who is no longer serving due to resignation or removal, whether by judicial process or pursuant to the trust agreement, or as a result of the trust terminating, does not have a duty to defend or continue to prosecute or defend the trust or its assets in any action, whether the trust is in existence or not at the time of such action.
SDCL 55-1A-32