Update tests
This commit is contained in:
parent
1b1c1ecc8f
commit
688a700fd6
21
.github/workflows/cron.yml
vendored
21
.github/workflows/cron.yml
vendored
@ -89,7 +89,7 @@ jobs:
|
||||
|
||||
cat > run.sh <<'EOF'
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -eEx
|
||||
|
||||
log1=/var/log/secure
|
||||
log2=/var/log/messages
|
||||
@ -103,10 +103,9 @@ jobs:
|
||||
}
|
||||
|
||||
restart_ipsec() {
|
||||
sed -i '/pluto/d' "$log1"
|
||||
pkill -HUP rsyslog
|
||||
systemctl restart ipsec
|
||||
sleep 1
|
||||
if ! command -v amazon-linux-extras; then
|
||||
systemctl restart ipsec
|
||||
fi
|
||||
echo "Waiting for IPsec to restart."
|
||||
count=0
|
||||
while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do
|
||||
@ -402,9 +401,6 @@ jobs:
|
||||
restart_ipsec
|
||||
ipsec status | grep -q ikev2-cp
|
||||
|
||||
sed -i '/pluto/d' "$log1"
|
||||
pkill -HUP rsyslog
|
||||
|
||||
if [ "$1" != "amazon" ]; then
|
||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade-centos
|
||||
else
|
||||
@ -506,14 +502,12 @@ jobs:
|
||||
steps:
|
||||
- name: Test
|
||||
run: |
|
||||
set -ex
|
||||
|
||||
log1=/var/log/auth.log
|
||||
log2=/var/log/syslog
|
||||
|
||||
restart_ipsec() {
|
||||
sed -i '/pluto/d' "$log1"
|
||||
pkill -HUP rsyslog
|
||||
service ipsec restart
|
||||
sleep 1
|
||||
echo "Waiting for IPsec to restart."
|
||||
count=0
|
||||
while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do
|
||||
@ -811,9 +805,6 @@ jobs:
|
||||
restart_ipsec
|
||||
ipsec status | grep -q ikev2-cp
|
||||
|
||||
sed -i '/pluto/d' "$log1"
|
||||
pkill -HUP rsyslog
|
||||
|
||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade
|
||||
sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh
|
||||
|
||||
|
21
.github/workflows/main.yml
vendored
21
.github/workflows/main.yml
vendored
@ -118,7 +118,7 @@ jobs:
|
||||
|
||||
cat > run.sh <<'EOF'
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -eEx
|
||||
|
||||
log1=/var/log/secure
|
||||
log2=/var/log/messages
|
||||
@ -132,10 +132,9 @@ jobs:
|
||||
}
|
||||
|
||||
restart_ipsec() {
|
||||
sed -i '/pluto/d' "$log1"
|
||||
pkill -HUP rsyslog
|
||||
systemctl restart ipsec
|
||||
sleep 1
|
||||
if ! command -v amazon-linux-extras; then
|
||||
systemctl restart ipsec
|
||||
fi
|
||||
echo "Waiting for IPsec to restart."
|
||||
count=0
|
||||
while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do
|
||||
@ -431,9 +430,6 @@ jobs:
|
||||
restart_ipsec
|
||||
ipsec status | grep -q ikev2-cp
|
||||
|
||||
sed -i '/pluto/d' "$log1"
|
||||
pkill -HUP rsyslog
|
||||
|
||||
if [ "$1" != "amazon" ]; then
|
||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade-centos
|
||||
else
|
||||
@ -535,14 +531,12 @@ jobs:
|
||||
steps:
|
||||
- name: Test
|
||||
run: |
|
||||
set -ex
|
||||
|
||||
log1=/var/log/auth.log
|
||||
log2=/var/log/syslog
|
||||
|
||||
restart_ipsec() {
|
||||
sed -i '/pluto/d' "$log1"
|
||||
pkill -HUP rsyslog
|
||||
service ipsec restart
|
||||
sleep 1
|
||||
echo "Waiting for IPsec to restart."
|
||||
count=0
|
||||
while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do
|
||||
@ -840,9 +834,6 @@ jobs:
|
||||
restart_ipsec
|
||||
ipsec status | grep -q ikev2-cp
|
||||
|
||||
sed -i '/pluto/d' "$log1"
|
||||
pkill -HUP rsyslog
|
||||
|
||||
wget -t 3 -T 30 -nv -O vpnup.sh https://git.io/vpnupgrade
|
||||
sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user