Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hwdsl2 committed Jan 3, 2021
1 parent 40b8561 commit 70ed6f7
Showing 1 changed file with 52 additions and 2 deletions.
54 changes: 52 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
if [ "$1" = "centos" ]; then
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup-centos
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
else
export DEBIAN_FRONTEND=noninteractive
Expand All @@ -87,6 +87,7 @@ jobs:
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup
fi
sed -i '/swan_ver_url/s/^/#/' vpnsetup.sh
sh vpnsetup.sh
if [ "$1" = "centos" ] || [ "$1" = "amazon" ]; then
systemctl start ipsec
Expand Down Expand Up @@ -172,13 +173,42 @@ jobs:
if [ "$1" = "centos" ]; then
wget -t 3 -T 30 -nv -O vpnupgrade.sh https://git.io/vpnupgrade-centos
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
else
sed -i '/pluto/d' /var/log/auth.log
pkill -HUP rsyslog
wget -t 3 -T 30 -nv -O vpnupgrade.sh https://git.io/vpnupgrade
fi
sed -i '/swan_ver_url/s/^/#/' vpnupgrade.sh
sed -i '/^SWAN_VER=/s/4.1/3.32/' vpnupgrade.sh
sh vpnupgrade.sh <<ANSWERS
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
Expand Down Expand Up @@ -282,6 +312,7 @@ jobs:
service rsyslog start
wget -t 3 -T 30 -nv -O vpnsetup.sh https://git.io/vpnsetup
sed -i '/swan_ver_url/s/^/#/' vpnsetup.sh
sh vpnsetup.sh
sleep 5
Expand Down Expand Up @@ -342,7 +373,26 @@ jobs:
sed -i '/pluto/d' /var/log/auth.log
pkill -HUP rsyslog
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
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
Expand Down

0 comments on commit 70ed6f7

Please sign in to comment.