Firmware upgrade via shell

Hi, I was wondering if it would be possible to upgrade the firmware of my router (Flint 2) via shell (ssh)?

I updated some packages using opkg and the Gl-INET web interface just stoped working, although I still have access to luci. I checked the nginx logs and some variable in a lua script is null which causes the entire thing to crash (error message attached below). Every time I try to login I get the following message:

Unknown Error. Please reboot or reset the router.

So, I really don’t want to reset my router because I have spent some time already configuring it. Is there a way to update the router to newest version, even preview via terminal?

stack traceback:
coroutine 0:
/usr/share/gl-ngx/oui-rpc.lua:23: in function '?'
/usr/share/gl-ngx/oui-rpc.lua:160: in function
</usr/share/gl-ngx/oui-rpc.lua:1>, client: 192.168.8.108,
server: , request: "POST /rpc HTTP/1.1", host:
"192.168.8.1", referrer: "https://192.168.8.1/"
2024/12/02 02:36:02 [crit] 5638#0: *454 connect() to
unix:/var/run/ngx-ubus-proxy.sock failed (2: No such file
or directory), client: 192.168.8.108, server: , request:
"POST /rpc HTTP/1.1", host: "192.168.8.1", referrer:
"https://192.168.8.1/"
2024/12/02 02:36:02 [error] 5638#0: *454 lua entry
thread aborted: runtime error: /usr/share/gl-ngx/oui-rpc.lua:23: attempt to index local 'res' (a nil value)

I am sorry for you, but upgrading packages using opkg will kill GL firmware mostly.
You can try to back up your current config via luci and do the reset. But I can't promise it will solve the issues.

Upgrading firmware after opkg update (so to resolve the issues) normally comes with a reset.