]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/scripts/vpn-watch
"All connection fine" message now only showed one time.
[ipfire-2.x.git] / src / scripts / vpn-watch
index 74a4dc5c1adb8adf1c4cd0dbfe12300a43f6971d..08d562be8499bb44c75b31c2e60357625fd1649d 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,10 +55,10 @@ 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.");}
  }
+ if ($debug){logger("All connections may be fine nothing was done.");}
 }
 
 sub logger {