This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Scripting and OpenVPN Client
#1
Hi,

is there a way to gain control of the built-in openVPN Client?

I would like to open the tunnel ONLY when needed and not keeping it always active...
I checked the docs but looks like there are no API to di that.... am I wrong?

thanks
M
Reply
#2
Event script, boolean object
Code:
enabled = event.getvalue()

require('uci')
uci.set('openvpn-lm', 'openvpn', 'enabled', enabled and 1 or 0)
uci.commit('openvpn-lm')
os.execute('/etc/init.d/openvpn-lm restart')
------------------------------
Ctrl+F5
Reply
#3
Thanks a lot!!! Big Grin
you make my day
Reply


Forum Jump: