skip VPN interface if disabled
This commit is contained in:
parent
c512af6fc5
commit
3dc29249d1
|
@ -11,6 +11,8 @@
|
|||
my $s2s = ${'openvpn-s2s'}{'status'} || 'disabled';
|
||||
if (defined $ovpndb && $s2s eq 'enabled'){
|
||||
foreach my $vpn ($ovpndb->get_all_by_prop(type=>'client'),$ovpndb->get_all_by_prop(type=>'server')){
|
||||
my $status = $vpn->prop('status') || 'disabled';
|
||||
next unless ($status eq 'enabled');
|
||||
my $name = $vpn->key;
|
||||
$if .= ",tun$name";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue