X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=src%2Fscripts%2Fvpn-watch;fp=src%2Fscripts%2Fvpn-watch;h=74a4dc5c1adb8adf1c4cd0dbfe12300a43f6971d;hp=462c6c3164b0cf2df4d89b14281cd1720db51d1b;hb=0fe5c268a97662fa2298e4901fda2d20bb4aa467;hpb=59a5196e60881acfa559ae4072e54088928a388b diff --git a/src/scripts/vpn-watch b/src/scripts/vpn-watch index 462c6c3164..74a4dc5c1a 100755 --- a/src/scripts/vpn-watch +++ b/src/scripts/vpn-watch @@ -50,7 +50,7 @@ foreach (@vpnsettings){ my $remoteip = `/usr/bin/ping -c 1 $remotehostname 2>/dev/null | head -n1 | awk '{print \$3}' | tr -d '()' | tr -d ':'`;chomp($remoteip); if ($remoteip eq ""){next;if ($debug){logger("Unable to resolve $remotehostname.");}} my $connected= `ipsec whack --status | grep $remoteip`; - my $established= `ipsec whack --status | grep '$settings[2]' | grep 'ISAKMP SA established'`; + my $established= `ipsec whack --status | grep '$settings[2]' | grep 'IPsec SA established'`; if ( $established eq '' || $connected eq '' ){ logger("Remote IP for host $remotehostname has changed or no connection is established, restarting connection to $remoteip.");