From 282a8e5e5aa7ce4d7dc4294eb7f1c1ba7d46ad83 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Sat, 12 Jun 2021 22:34:34 -0500 Subject: [PATCH] Update tests --- .github/workflows/cron.yml | 6 ++++-- .github/workflows/main.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index dd341a4..b9a4948 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -106,9 +106,10 @@ jobs: sed -i '/pluto/d' "$log1" pkill -HUP rsyslog systemctl restart ipsec + sleep 1 echo "Waiting for IPsec to restart." count=0 - while ! grep -q 'listening for IKE messages' "$log1"; do + while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do [ "$count" -ge "30" ] && { echo "IPsec failed to start."; exit 1; } count=$((count+1)) printf '%s' '.' @@ -400,9 +401,10 @@ jobs: sed -i '/pluto/d' "$log1" pkill -HUP rsyslog service ipsec restart + sleep 1 echo "Waiting for IPsec to restart." count=0 - while ! grep -q 'listening for IKE messages' "$log1"; do + while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do [ "$count" -ge "30" ] && { echo "IPsec failed to start."; exit 1; } count=$((count+1)) printf '%s' '.' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 588975d..2254d41 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -135,9 +135,10 @@ jobs: sed -i '/pluto/d' "$log1" pkill -HUP rsyslog systemctl restart ipsec + sleep 1 echo "Waiting for IPsec to restart." count=0 - while ! grep -q 'listening for IKE messages' "$log1"; do + while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do [ "$count" -ge "30" ] && { echo "IPsec failed to start."; exit 1; } count=$((count+1)) printf '%s' '.' @@ -429,9 +430,10 @@ jobs: sed -i '/pluto/d' "$log1" pkill -HUP rsyslog service ipsec restart + sleep 1 echo "Waiting for IPsec to restart." count=0 - while ! grep -q 'listening for IKE messages' "$log1"; do + while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do [ "$count" -ge "30" ] && { echo "IPsec failed to start."; exit 1; } count=$((count+1)) printf '%s' '.'