Is there a way to connect/disconnect to a OpenVPN/WireGuard client vpn programaticlly?

I have several OpenVPN/WireGuard clients defined. I want to use an external service like HomeAssistant to connect/disconnect to one of those vpns. I’m assuming an http post or REST command can do this? Can you please point me in the right direction?

Point: SSH into router and disconnect Wiregurd Client - #8 by geldsock

That’s never worked. And if I’m going to have to SSH in, I might as well just use curl.

As far as i can see /etc/init.d/wireguard st[art|op] is marked as solution.

Another try is the GL.iNet API: Loading...

https://dev.gl-inet.com/api/#api-OpenVPN-GetOvpnServerStart
https://dev.gl-inet.com/api/#api-Wireguard-PostWireguardServerStart

Answered you here Can’t execute a simple curl command? - #4 by WhiskerBiscuit