Wireguard "hooks" when using LuCi

I am using wireguard, installed and set up using LuCi, to be started after boot already. However, because of the dependency of wg to have the clock going forward only, I had to mess around patching, to adjust time before start of wg, bypassing LuCi.
Which means, I could get rid of LuCi completely, as it is not "sufficicient", anyway. But I did not succeed in setting up the routing of all traffic via wg, when generating an image myself, without LuCi.
For re-engineering the LuCi approach, I would like to get some directions, where to look, which scripts LuCi uses to set up wg and routing.

You may wish to go to the develoveper mail list.

LuCI is not related to Wireguard. If you're referring to the app, understandable. LuCI is not intended to replace use of the the UCI command line or UCI config file method.

...also, are you saying that LuCI is causing the hang?

No.
But I do not see any sense to use LuCi, in case I have to patch around manually anyway, to get wg properly up and running after pwr off/on, because of the time setting.

I took a quick look and there is no LuCI specific logic regarding wireguard at all. It merely reads and writes /etc/config/network and calls a wg show all dump command to fetch status info.

Maybe you just left out some crucical package when building your image without LuCI.