OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: mdbraber on January 20, 2020, 11:36:11 PM

Title: API commands for Wireguard: how to "save" changes?
Post by: mdbraber on January 20, 2020, 11:36:11 PM
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?
Title: Re: API commands for Wireguard: how to "save" changes?
Post by: mdbraber on January 21, 2020, 07:44:18 AM
After looking through some code I found there's an undocumented command "/wireguard/service/reconfigure". Upon executing that command it does the trick.