1
0
mirror of synced 2024-11-22 13:06:02 +03:00

Update tests

This commit is contained in:
hwdsl2 2023-01-04 21:25:16 -06:00
parent c356a75bca
commit 45a26534e9

View File

@ -17,7 +17,7 @@ jobs:
if: github.repository_owner == 'hwdsl2' if: github.repository_owner == 'hwdsl2'
strategy: strategy:
matrix: matrix:
os_version: ["centos:8s", "centos:7", "rockylinux:8", "almalinux:9", "almalinux:8", "amazonlinux:2", "oraclelinux:9", "oraclelinux:8", "oraclelinux:7"] os_version: ["centos:9s", "centos:8s", "centos:7", "rockylinux:8", "almalinux:9", "almalinux:8", "amazonlinux:2", "oraclelinux:9", "oraclelinux:8", "oraclelinux:7"]
fail-fast: false fail-fast: false
env: env:
OS_VERSION: ${{ matrix.os_version }} OS_VERSION: ${{ matrix.os_version }}
@ -57,6 +57,11 @@ jobs:
if ! command -v amazon-linux-extras; then if ! command -v amazon-linux-extras; then
systemctl restart ipsec systemctl restart ipsec
fi fi
if grep -qs -i stream /etc/redhat-release \
&& grep -qs 'release 9' /etc/redhat-release; then
sleep 5
return 0
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
@ -91,7 +96,10 @@ jobs:
yum -y -q install diffutils yum -y -q install diffutils
fi fi
fi fi
if ! grep -qs -i stream /etc/redhat-release \
|| ! grep -qs 'release 9' /etc/redhat-release; then
systemctl start rsyslog systemctl start rsyslog
fi
cp -f /opt/src/scripts/vpnsetup.sh . cp -f /opt/src/scripts/vpnsetup.sh .
cp -f /opt/src/scripts/extras/vpnuninstall.sh ./vpnunst.sh cp -f /opt/src/scripts/extras/vpnuninstall.sh ./vpnunst.sh
@ -104,9 +112,12 @@ jobs:
systemctl restart xl2tpd systemctl restart xl2tpd
restart_ipsec restart_ipsec
if ! grep -qs 'release 9' /etc/oracle-release; then if ! grep -qs 'release 9' /etc/oracle-release; then
if ! grep -qs -i stream /etc/redhat-release \
|| ! grep -qs 'release 9' /etc/redhat-release; then
restart_fail2ban restart_fail2ban
cat /var/log/fail2ban.log cat /var/log/fail2ban.log
fi fi
fi
netstat -anpu | grep pluto netstat -anpu | grep pluto
netstat -anpu | grep xl2tpd netstat -anpu | grep xl2tpd
@ -122,8 +133,11 @@ jobs:
iptables -nvL -t nat | grep -q '192\.168\.42\.0/24' iptables -nvL -t nat | grep -q '192\.168\.42\.0/24'
iptables -nvL -t nat | grep -q '192\.168\.43\.0/24' iptables -nvL -t nat | grep -q '192\.168\.43\.0/24'
fi fi
if ! grep -qs -i stream /etc/redhat-release \
|| ! grep -qs 'release 9' /etc/redhat-release; then
grep pluto "$log1" grep pluto "$log1"
grep xl2tpd "$log2" grep xl2tpd "$log2"
fi
ipsec status ipsec status
ipsec status | grep -q l2tp-psk ipsec status | grep -q l2tp-psk
ipsec status | grep -q xauth-psk ipsec status | grep -q xauth-psk
@ -244,7 +258,10 @@ jobs:
pk12util -W "" -l /etc/ipsec.d/vpnclient.p12 | grep AES-256 && exit 1 pk12util -W "" -l /etc/ipsec.d/vpnclient.p12 | grep AES-256 && exit 1
restart_ipsec restart_ipsec
if ! grep -qs -i stream /etc/redhat-release \
|| ! grep -qs 'release 9' /etc/redhat-release; then
grep pluto "$log1" | tail -n 20 grep pluto "$log1" | tail -n 20
fi
ipsec status | grep -q ikev2-cp ipsec status | grep -q ikev2-cp
bash ikev2.sh <<ANSWERS bash ikev2.sh <<ANSWERS