netjsonconfig
netjsonconfig copied to clipboard
[fix] Fix OpenVpn.auto_client method for OpenWrt 22
On OpenWrt 22, the script_security option should be set to 2 by default. We should update this method to set the default value according to OpenWrt version.
Also the value of log should be fixed, because trying to log to /var/log/openvpn/<if>.log won't work because /var/log/openvpn/ does not exist. We could simply replace /var/log/openvpn/ with /var/log/.