From: Christian Schmidt Date: Sat, 22 Jan 2011 10:16:39 +0000 (+0100) Subject: Fix vpn-watch script not restarting minutly when remote ip has changed. X-Git-Tag: v2.9-core45~1^2~21^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa7970cc87ef9b4dfb8e771b6d80e457ef27658b;p=ipfire-2.x.git Fix vpn-watch script not restarting minutly when remote ip has changed. --- diff --git a/src/scripts/vpn-watch b/src/scripts/vpn-watch index ee6807cdbc..466aaa62dc 100755 --- a/src/scripts/vpn-watch +++ b/src/scripts/vpn-watch @@ -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;