1
0
mirror of synced 2024-11-25 14:26:09 +03:00

Update tests

This commit is contained in:
hwdsl2 2021-01-02 23:44:12 -06:00
parent 40b8561962
commit 0119de50ad

View File

@ -76,7 +76,7 @@ jobs:
if [ "$1" = "centos" ]; then if [ "$1" = "centos" ]; then
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup-centos wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup-centos
else else
wget -t 3 -T 30 -nv -O vpnsetup.sh https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/vpnsetup_amzn.sh wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup-amzn
fi fi
else else
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
@ -87,6 +87,7 @@ jobs:
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup
fi fi
sed -i '/swan_ver_url/s/^/#/' vpnsetup.sh
sh vpnsetup.sh sh vpnsetup.sh
if [ "$1" = "centos" ] || [ "$1" = "amazon" ]; then if [ "$1" = "centos" ] || [ "$1" = "amazon" ]; then
systemctl start ipsec systemctl start ipsec
@ -172,15 +173,43 @@ jobs:
if [ "$1" = "centos" ]; then if [ "$1" = "centos" ]; then
wget -t 3 -T 30 -nv -O vpnupgrade.sh https://git.io/vpnupgrade-centos wget -t 3 -T 30 -nv -O vpnupgrade.sh https://git.io/vpnupgrade-centos
else else
wget -t 3 -T 30 -nv -O vpnupgrade.sh https://github.com/hwdsl2/setup-ipsec-vpn/raw/master/extras/vpnupgrade_amzn.sh wget -t 3 -T 30 -nv -O vpnupgrade.sh https://git.io/vpnupgrade-amzn
fi fi
else else
sed -i '/pluto/d' /var/log/auth.log sed -i '/pluto/d' /var/log/auth.log
pkill -HUP rsyslog pkill -HUP rsyslog
wget -t 3 -T 30 -nv -O vpnupgrade.sh https://git.io/vpnupgrade wget -t 3 -T 30 -nv -O vpnupgrade.sh https://git.io/vpnupgrade
fi fi
sed -i '/swan_ver_url/s/^/#/' vpnupgrade.sh
sed -i '/^SWAN_VER=/s/4.1/3.32/' vpnupgrade.sh
sh vpnupgrade.sh <<ANSWERS sh vpnupgrade.sh <<ANSWERS
y y
ANSWERS
if [ "$1" = "centos" ] || [ "$1" = "amazon" ]; then
systemctl restart ipsec
sleep 10
grep pluto /var/log/secure
else
sleep 10
grep pluto /var/log/auth.log
fi
ipsec status
ipsec status | grep -q l2tp-psk
ipsec status | grep -q xauth-psk
ipsec status | grep -q ikev2-cp
if [ "$1" = "centos" ] || [ "$1" = "amazon" ]; then
sed -i '/pluto/d' /var/log/secure
pkill -HUP rsyslog
else
sed -i '/pluto/d' /var/log/auth.log
pkill -HUP rsyslog
fi
sed -i '/^SWAN_VER=/s/3.32/4.1/' vpnupgrade.sh
sh vpnupgrade.sh <<ANSWERS
y y
ANSWERS ANSWERS
@ -282,6 +311,7 @@ jobs:
service rsyslog start service rsyslog start
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup
sed -i '/swan_ver_url/s/^/#/' vpnsetup.sh
sh vpnsetup.sh sh vpnsetup.sh
sleep 5 sleep 5
@ -342,9 +372,27 @@ jobs:
sed -i '/pluto/d' /var/log/auth.log sed -i '/pluto/d' /var/log/auth.log
pkill -HUP rsyslog pkill -HUP rsyslog
wget -t 3 -T 30 -nv -O vpnupgrade.sh https://git.io/vpnupgrade wget -t 3 -T 30 -nv -O vpnupgrade.sh https://git.io/vpnupgrade
sed -i '/swan_ver_url/s/^/#/' vpnupgrade.sh
sed -i '/^SWAN_VER=/s/4.1/3.32/' vpnupgrade.sh
sh vpnupgrade.sh <<ANSWERS sh vpnupgrade.sh <<ANSWERS
y y
ANSWERS
sleep 10
grep pluto /var/log/auth.log
ipsec status
ipsec status | grep -q l2tp-psk
ipsec status | grep -q xauth-psk
ipsec status | grep -q ikev2-cp
sed -i '/pluto/d' /var/log/auth.log
pkill -HUP rsyslog
sed -i '/^SWAN_VER=/s/3.32/4.1/' vpnupgrade.sh
sh vpnupgrade.sh <<ANSWERS
y y
ANSWERS ANSWERS