skip VPN interface if disabled

tags/0.1.1
Daniel Berteaud 12 years ago
parent c512af6fc5
commit 3dc29249d1
  1. 2
      root/etc/e-smith/templates/etc/ntop.conf/30interface

@ -11,6 +11,8 @@
my $s2s = ${'openvpn-s2s'}{'status'} || 'disabled'; my $s2s = ${'openvpn-s2s'}{'status'} || 'disabled';
if (defined $ovpndb && $s2s eq 'enabled'){ if (defined $ovpndb && $s2s eq 'enabled'){
foreach my $vpn ($ovpndb->get_all_by_prop(type=>'client'),$ovpndb->get_all_by_prop(type=>'server')){ 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; my $name = $vpn->key;
$if .= ",tun$name"; $if .= ",tun$name";
} }

Loading…
Cancel
Save