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