skip VPN interface if disabled

This commit is contained in:
Daniel Berteaud 2013-01-15 09:57:02 +01:00
parent c512af6fc5
commit 3dc29249d1
1 changed files with 2 additions and 0 deletions

View File

@ -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";
}