Fix vpn-watch hang after a connection was restartet.

This commit is contained in:
Arne Fitzenreiter
2010-05-29 23:32:49 +02:00
parent ba149d470b
commit 98ccaf67ae
2 changed files with 3 additions and 2 deletions

View File

@@ -133,3 +133,4 @@ var/ipfire/updatexlrator/bin/lscache
var/ipfire/updatexlrator/updxlrator-lib.pl
var/log/cache
var/log/updatexlrator
usr/local/bin/vpn-watch

View File

@@ -1,6 +1,6 @@
#!/usr/bin/perl
##################################################
##### VPN-Watch.pl Version 0.4 #####
##### VPN-Watch.pl Version 0.4a #####
##################################################
# #
# VPN-Watch is part of the IPFire Firewall #
@@ -55,7 +55,7 @@ foreach (@vpnsettings){
if ( $established eq '' || $connected eq '' ){
logger("Remote IP for host $remotehostname has changed or no connection is established, restarting connection to $remoteip.");
system("/usr/local/bin/ipsecctrl S $settings[0]");
next;
last; #all connections will reloaded
}
if ($debug){logger("All connections may be fine nothing was done.");}
}