]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/scripts/vpn-watch
Fix vpn-watch hang after a connection was restartet.
[people/pmueller/ipfire-2.x.git] / src / scripts / vpn-watch
index 74a4dc5c1adb8adf1c4cd0dbfe12300a43f6971d..c533f064e3dcc8f4f54c637f3e5fc35d67cd9404 100755 (executable)
@@ -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.");}
  }