Hello,
Yes, you are correct. The uci commit command is used to save the current configuration so it will persist after a reboot. Also, you restart the service after the commit, the service will use the new uci configuration. So, if you make changes using uci set but don't commit them, they will be lost when the system restarts.
Hence, if you set openvpn.VPN.enable to 0, and then commit the change, OpenVPN should be disabled by default after a reboot. Though, if you have OpenVPN disabled and you enable it via UCI without restarting the service or rebooting the device, the WebUI may show that VPN is enabled. However, it will actually be disabled until the service is restarted/started or the device is rebooted.
As you have already mentioned, you can enable it on demand using:
- uci set openvpn.VPN.enable='1'
- uci commit
- /etc/init.d/openvpn restart
Kind Regards,
Andzej