]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Fix vpn-watch script not restarting minutly when remote ip has changed.
authorChristian Schmidt <maniacikarus@ipfire.org>
Sat, 22 Jan 2011 10:16:39 +0000 (11:16 +0100)
committerChristian Schmidt <maniacikarus@ipfire.org>
Sat, 22 Jan 2011 10:16:39 +0000 (11:16 +0100)
src/scripts/vpn-watch

index ee6807cdbc06e5d0cfcb1276f7601a3f43f9f4ed..466aaa62dc1725fb6a8dccdb2b7c08643a2167f0 100755 (executable)
@@ -57,7 +57,7 @@ foreach (@vpnsettings){
   my $ipmatch= `echo "$status" | grep '$remoteip' | grep '$settings[2]'`;
   my $established= `echo "$status" | grep '$settings[2]' | grep 'erouted;'`;
   
-  if ( $ipmatch eq '' && $status ne ''){
+  if ( $round == 0 && $ipmatch eq '' && $status ne ''){
     logger("Remote IP for host $remotehostname($remoteip) has changed, restarting ipsec.");
     system("/usr/local/bin/ipsecctrl S $settings[0]");
     $round=0;