Yes, I did mention it was pretty hacky - I just kept adding stuff 
Some explanation:
-
When switching between my Repeater config and my Repeater+OpenVPN config I want to keep the radio0 client-wireless and radio1 AP settings when I switch. I noticed /etc/config/wireless was the same for both so I just backed it up and restored after untarring the new config. This worked until I added a config which used a usb tethered ZTE Z915 LTE modem rather than client-wireless. When I switched to that config the restored <span style=“line-height: 1.5;”>/etc/config/wireless would make OpenWRT connect via wifi and not use the modem so I added more logic to only overwrite </span><span style=“line-height: 1.5;”>/etc/config/wireless if the new version had client-wireless enabled.</span>
-
I wasn’t sure the exact ‘uci get’ I need to find if ‘wwan’ was disabled and I was configuring everything via luci and didnt notice an option to add a name. I could edit the config manually to add the name but would it get preserved if I change things via luci?
-
Yes, backing up the whole file is not great, however I always have the same AP config on radio1 so its just the client-wireless setting on radio0 that change. I couldn’t think of an easy way to isolate all the sections and options I would need to preserve from /etc/config/wireless so I just preserve the whole file. I was also worried that luci might create new client-wireless options that I don’t expect about when I scan/connect manually.
-
I was creating several numbered configurations ( /root/config{0,1,2}.tar.gz ) and the script cycles between them and flashes the LED to show which one its loading. My goal was to load the first configuration (Universal Repeater) use luci to connect to hotel wifi, then click reset button to reboot and activate OpenVPN+Repeater configuration. I added the third configuration when I realized I also wanted it to act as an AP to my LTE modem.
OpenWRT is great and super configurable but I prefer simple web interfaces - the Gl.iNet one is nice, and much easier than luci , especially on my phone, but it doesn’t have the functions I need. If there was a ‘Universal Repeater’ wizard with an option to activate OpenVPN and route all traffic over the tunnel I think I would just use that.
Great idea about resetting wireless/network and avoiding reboot. I’ll give that a try this weekend.
Thanks
Craig