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 <name>'

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2023-12-20 10:19:24 +01:00
parent 0b633a0886
commit 9a27865acb

View file

@ -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'