Remote diagnosis of WAN failure

I love networking, so I recently decided to add a second WAN to my home network as failover. If I am being honest, my current ISP has been exceptionally reliable! It's not that this is a pressing issue. Still, I love messing with new configs.
The goal was to get a notification and ability to remotely troubleshoot the primary fiber connection in case it fails.
My ISP provides me with a fiber optic cable that runs to my apartment, which I then connect to a Nokia G-010S-A GPON. This GPON exposes SSH, which allows the user to perform relatively low-level diagnosis.
My current gateway is UniFi Dream Router 7, which is excellent, but unfortunately it does not expose much GPON details on the dashboard, and neither does it have the ability to add a second IP to the GPON WAN interface.
Fortunately, this can be overcome with manual SSH commands.
I wrote a small script that SSHs into UniFi, temporarily adds the required IP, opens an interactive GPON shell, and removes the address when I exit. If the fiber link fails while I am away, I can connect through cellular and inspect the GPON directly with minimal effort.
In case this is useful for somebody else, I put this script on my GitHub: https://github.com/shiromiso/ssh-gpon
Feel free to drop a comment on the LinkedIn post for this article.