openwisp / netjsonconfig

Network configuration management library based on NetJSON DeviceConfiguration
https://netjsonconfig.openwisp.org/
Other
359 stars 72 forks source link

[fix] Fix OpenVpn.auto_client method for OpenWrt 22 #240

Closed pandafy closed 1 year ago

pandafy commented 2 years ago

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.

nemesifier commented 2 years ago

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/.