Syntax changes RUTX08 07.12.3 -> 07.13.4 OpenVPN

Hi Teltonika team,

we have many RUTX08 around the world and manage the I/O’s with a script.

In 07.13.4 is a syntax change (again), with 07.12.3 we can detect the OpenVPN by the name:

ifconfig | grep -q ‘VPNName
now it’s replaced by the “interface”:
ifconfig | grep -q ‘tun_

Also enable and disable OpenVPN was before possible with:

uci set openvpn.VPNNAME.enable=‘0’
now the syntax of the setting is:
uci set openvpn.inst1.enable=‘0’

Is there a better way to script this upgrade resistant?

Thanks.

Yes, use API it shouldn’t change between versions. https://developers.teltonika-networks.com/

Hello @itsam,

Could you please confirm whether your issue has been resolved or if you still require any assistance?

Best regards,

Hi @Marija ,

still more questions than answers at the moment :slight_smile:

Unfortunately the examples [1] don’t show how to script it local on the device as /bin/sh script.

I need the following:


read input
if yes connect openvpn and enable output (high)
else disconnect openvpn and disable output (low)

I can use the api local in the script without authentication, right?

[1] https://developers.teltonika-networks.com/tutorials/

It can be called locally without authentication by using /sbin/api

1 Like