From: Florian Eckert Date: Wed, 20 Dec 2023 09:19:24 +0000 (+0100) Subject: openvpn: add possibility to start openvpn_path_instance on request X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=9a27865acbcd08acc703d0e9412a6fe93c12d4b6;p=openwrt-packages.git openvpn: add possibility to start openvpn_path_instance on request This commit adds the possibility that an OpenVPN instance located under '/etc/openvpn' can also be started with the command. '/etc/init.d/openvpn start ' Signed-off-by: Florian Eckert --- diff --git a/net/openvpn/files/openvpn.init b/net/openvpn/files/openvpn.init index 791018cc4..806afe275 100644 --- a/net/openvpn/files/openvpn.init +++ b/net/openvpn/files/openvpn.init @@ -263,8 +263,11 @@ start_service() { config_load 'openvpn' if [ -n "$instance" ]; then - [ "$instance_found" -gt 0 ] || return - start_uci_instance "$instance" + if [ "$instance_found" -gt 0 ]; then + start_uci_instance "$instance" + else + start_path_instance "$instance" + fi else config_foreach start_uci_instance 'openvpn'