API commands for Wireguard: how to "save" changes?

Started by mdbraber, January 20, 2020, 11:36:11 PM

Previous topic - Next topic
Hi,

I'm using the API to change wireguard settings (/server/toggleserver). This is reflected fine in the GUI, but it's not effective until I hit "save" in the GUI. I can't get it to directly "activate" using API commands. I've tried /general/set and it gives back {"result":"saved"} but it still doesn't work until I manually hit "Save" in the GUI on wireguard settings.

Any tips?

After looking through some code I found there's an undocumented command "/wireguard/service/reconfigure". Upon executing that command it does the trick.