From 7a7f7e99993b243a88bcd42fafaf5b7f588da19a Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Tue, 14 Sep 2021 23:53:56 -0500 Subject: [PATCH] Update tests --- .github/workflows/cron.yml | 102 ++++++++++++++++++++----------------- .github/workflows/main.yml | 102 ++++++++++++++++++++----------------- 2 files changed, 108 insertions(+), 96 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index f7d29d5..ac21e7a 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -32,64 +32,70 @@ jobs: sudo apt-get -yqq update sudo apt-get -yqq install wget curl - wget_c="wget -t 3 -T 30 -nv -O" - gh_url="https://github.com/hwdsl2/setup-ipsec-vpn/raw/master" + wg="wget -t 3 -T 30 -nv -O" + gh="https://github.com/hwdsl2/setup-ipsec-vpn/raw/master" + gi="https://git.io" - $wget_c vpnsetup.sh https://git.io/vpnsetup - $wget_c vpnsetup_centos.sh https://git.io/vpnsetup-centos - $wget_c vpnsetup_amzn.sh https://git.io/vpnsetup-amzn - $wget_c vpnsetup_ubuntu.sh https://git.io/vpnsetup-ubuntu - $wget_c vpnsetup_alpine.sh https://git.io/vpnsetup-alpine - $wget_c quickstart.sh https://git.io/vpnquickstart - $wget_c ikev2setup.sh https://git.io/ikev2setup - $wget_c vpnupgrade.sh https://git.io/vpnupgrade - $wget_c vpnupgrade_centos.sh https://git.io/vpnupgrade-centos - $wget_c vpnupgrade_amzn.sh https://git.io/vpnupgrade-amzn - $wget_c vpnupgrade_ubuntu.sh https://git.io/vpnupgrade-ubuntu - $wget_c vpnupgrade_alpine.sh https://git.io/vpnupgrade-alpine + $wg vpnsetup.sh "$gi/vpnsetup" + $wg vpnsetup_centos.sh "$gi/vpnsetup-centos" + $wg vpnsetup_amzn.sh "$gi/vpnsetup-amzn" + $wg vpnsetup_ubuntu.sh "$gi/vpnsetup-ubuntu" + $wg vpnsetup_alpine.sh "$gi/vpnsetup-alpine" + $wg quickstart.sh "$gi/vpnquickstart" + $wg ikev2setup.sh "$gi/ikev2setup" + $wg vpnupgrade.sh "$gi/vpnupgrade" + $wg vpnupgrade_centos.sh "$gi/vpnupgrade-centos" + $wg vpnupgrade_amzn.sh "$gi/vpnupgrade-amzn" + $wg vpnupgrade_ubuntu.sh "$gi/vpnupgrade-ubuntu" + $wg vpnupgrade_alpine.sh "$gi/vpnupgrade-alpine" + $wg vpnuninstall.sh "$gi/vpnuninstall" - $wget_c vpnsetup2.sh "$gh_url/vpnsetup.sh" - $wget_c vpnsetup_centos2.sh "$gh_url/vpnsetup_centos.sh" - $wget_c vpnsetup_amzn2.sh "$gh_url/vpnsetup_amzn.sh" - $wget_c vpnsetup_ubuntu2.sh "$gh_url/vpnsetup_ubuntu.sh" - $wget_c vpnsetup_alpine2.sh "$gh_url/vpnsetup_alpine.sh" - $wget_c quickstart2.sh "$gh_url/extras/quickstart.sh" - $wget_c ikev2setup2.sh "$gh_url/extras/ikev2setup.sh" - $wget_c vpnupgrade2.sh "$gh_url/extras/vpnupgrade.sh" - $wget_c vpnupgrade_centos2.sh "$gh_url/extras/vpnupgrade_centos.sh" - $wget_c vpnupgrade_amzn2.sh "$gh_url/extras/vpnupgrade_amzn.sh" - $wget_c vpnupgrade_ubuntu2.sh "$gh_url/extras/vpnupgrade_ubuntu.sh" - $wget_c vpnupgrade_alpine2.sh "$gh_url/extras/vpnupgrade_alpine.sh" + $wg vpnsetup2.sh "$gh/vpnsetup.sh" + $wg vpnsetup_centos2.sh "$gh/vpnsetup_centos.sh" + $wg vpnsetup_amzn2.sh "$gh/vpnsetup_amzn.sh" + $wg vpnsetup_ubuntu2.sh "$gh/vpnsetup_ubuntu.sh" + $wg vpnsetup_alpine2.sh "$gh/vpnsetup_alpine.sh" + $wg quickstart2.sh "$gh/extras/quickstart.sh" + $wg ikev2setup2.sh "$gh/extras/ikev2setup.sh" + $wg vpnupgrade2.sh "$gh/extras/vpnupgrade.sh" + $wg vpnupgrade_centos2.sh "$gh/extras/vpnupgrade_centos.sh" + $wg vpnupgrade_amzn2.sh "$gh/extras/vpnupgrade_amzn.sh" + $wg vpnupgrade_ubuntu2.sh "$gh/extras/vpnupgrade_ubuntu.sh" + $wg vpnupgrade_alpine2.sh "$gh/extras/vpnupgrade_alpine.sh" + $wg vpnuninstall2.sh "$gh/extras/vpnuninstall.sh" - curl -fsSI https://bit.ly/addvpnuser | grep -q 'add_vpn_user.sh' - curl -fsSI https://bit.ly/delvpnuser | grep -q 'del_vpn_user.sh' - curl -fsSI https://bit.ly/updatevpnusers | grep -q 'update_vpn_users.sh' - - diff vpnsetup.sh ../vpnsetup.sh - diff vpnsetup_centos.sh ../vpnsetup_centos.sh - diff vpnsetup_amzn.sh ../vpnsetup_amzn.sh - diff vpnsetup_ubuntu.sh ../vpnsetup_ubuntu.sh - diff vpnsetup_alpine.sh ../vpnsetup_alpine.sh - diff quickstart.sh ../extras/quickstart.sh - diff ikev2setup.sh ../extras/ikev2setup.sh - diff vpnupgrade.sh ../extras/vpnupgrade.sh + diff vpnsetup.sh ../vpnsetup.sh + diff vpnsetup_centos.sh ../vpnsetup_centos.sh + diff vpnsetup_amzn.sh ../vpnsetup_amzn.sh + diff vpnsetup_ubuntu.sh ../vpnsetup_ubuntu.sh + diff vpnsetup_alpine.sh ../vpnsetup_alpine.sh + diff quickstart.sh ../extras/quickstart.sh + diff ikev2setup.sh ../extras/ikev2setup.sh + diff vpnupgrade.sh ../extras/vpnupgrade.sh diff vpnupgrade_centos.sh ../extras/vpnupgrade_centos.sh - diff vpnupgrade_amzn.sh ../extras/vpnupgrade_amzn.sh + diff vpnupgrade_amzn.sh ../extras/vpnupgrade_amzn.sh diff vpnupgrade_ubuntu.sh ../extras/vpnupgrade_ubuntu.sh diff vpnupgrade_alpine.sh ../extras/vpnupgrade_alpine.sh + diff vpnuninstall.sh ../extras/vpnuninstall.sh - diff vpnsetup2.sh ../vpnsetup.sh - diff vpnsetup_centos2.sh ../vpnsetup_centos.sh - diff vpnsetup_amzn2.sh ../vpnsetup_amzn.sh - diff vpnsetup_ubuntu2.sh ../vpnsetup_ubuntu.sh - diff vpnsetup_alpine2.sh ../vpnsetup_alpine.sh - diff quickstart2.sh ../extras/quickstart.sh - diff ikev2setup2.sh ../extras/ikev2setup.sh - diff vpnupgrade2.sh ../extras/vpnupgrade.sh + diff vpnsetup2.sh ../vpnsetup.sh + diff vpnsetup_centos2.sh ../vpnsetup_centos.sh + diff vpnsetup_amzn2.sh ../vpnsetup_amzn.sh + diff vpnsetup_ubuntu2.sh ../vpnsetup_ubuntu.sh + diff vpnsetup_alpine2.sh ../vpnsetup_alpine.sh + diff quickstart2.sh ../extras/quickstart.sh + diff ikev2setup2.sh ../extras/ikev2setup.sh + diff vpnupgrade2.sh ../extras/vpnupgrade.sh diff vpnupgrade_centos2.sh ../extras/vpnupgrade_centos.sh - diff vpnupgrade_amzn2.sh ../extras/vpnupgrade_amzn.sh + diff vpnupgrade_amzn2.sh ../extras/vpnupgrade_amzn.sh diff vpnupgrade_ubuntu2.sh ../extras/vpnupgrade_ubuntu.sh diff vpnupgrade_alpine2.sh ../extras/vpnupgrade_alpine.sh + diff vpnuninstall2.sh ../extras/vpnuninstall.sh + + bl="https://bit.ly" + curl -fsSI "$bl/addvpnuser" | grep -q 'add_vpn_user.sh' + curl -fsSI "$bl/delvpnuser" | grep -q 'del_vpn_user.sh' + curl -fsSI "$bl/updatevpnusers" | grep -q 'update_vpn_users.sh' test_set_1: needs: check_urls diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5914a9e..acbaca5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,64 +61,70 @@ jobs: sudo apt-get -yqq update sudo apt-get -yqq install wget curl - wget_c="wget -t 3 -T 30 -nv -O" - gh_url="https://github.com/hwdsl2/setup-ipsec-vpn/raw/master" + wg="wget -t 3 -T 30 -nv -O" + gh="https://github.com/hwdsl2/setup-ipsec-vpn/raw/master" + gi="https://git.io" - $wget_c vpnsetup.sh https://git.io/vpnsetup - $wget_c vpnsetup_centos.sh https://git.io/vpnsetup-centos - $wget_c vpnsetup_amzn.sh https://git.io/vpnsetup-amzn - $wget_c vpnsetup_ubuntu.sh https://git.io/vpnsetup-ubuntu - $wget_c vpnsetup_alpine.sh https://git.io/vpnsetup-alpine - $wget_c quickstart.sh https://git.io/vpnquickstart - $wget_c ikev2setup.sh https://git.io/ikev2setup - $wget_c vpnupgrade.sh https://git.io/vpnupgrade - $wget_c vpnupgrade_centos.sh https://git.io/vpnupgrade-centos - $wget_c vpnupgrade_amzn.sh https://git.io/vpnupgrade-amzn - $wget_c vpnupgrade_ubuntu.sh https://git.io/vpnupgrade-ubuntu - $wget_c vpnupgrade_alpine.sh https://git.io/vpnupgrade-alpine + $wg vpnsetup.sh "$gi/vpnsetup" + $wg vpnsetup_centos.sh "$gi/vpnsetup-centos" + $wg vpnsetup_amzn.sh "$gi/vpnsetup-amzn" + $wg vpnsetup_ubuntu.sh "$gi/vpnsetup-ubuntu" + $wg vpnsetup_alpine.sh "$gi/vpnsetup-alpine" + $wg quickstart.sh "$gi/vpnquickstart" + $wg ikev2setup.sh "$gi/ikev2setup" + $wg vpnupgrade.sh "$gi/vpnupgrade" + $wg vpnupgrade_centos.sh "$gi/vpnupgrade-centos" + $wg vpnupgrade_amzn.sh "$gi/vpnupgrade-amzn" + $wg vpnupgrade_ubuntu.sh "$gi/vpnupgrade-ubuntu" + $wg vpnupgrade_alpine.sh "$gi/vpnupgrade-alpine" + $wg vpnuninstall.sh "$gi/vpnuninstall" - $wget_c vpnsetup2.sh "$gh_url/vpnsetup.sh" - $wget_c vpnsetup_centos2.sh "$gh_url/vpnsetup_centos.sh" - $wget_c vpnsetup_amzn2.sh "$gh_url/vpnsetup_amzn.sh" - $wget_c vpnsetup_ubuntu2.sh "$gh_url/vpnsetup_ubuntu.sh" - $wget_c vpnsetup_alpine2.sh "$gh_url/vpnsetup_alpine.sh" - $wget_c quickstart2.sh "$gh_url/extras/quickstart.sh" - $wget_c ikev2setup2.sh "$gh_url/extras/ikev2setup.sh" - $wget_c vpnupgrade2.sh "$gh_url/extras/vpnupgrade.sh" - $wget_c vpnupgrade_centos2.sh "$gh_url/extras/vpnupgrade_centos.sh" - $wget_c vpnupgrade_amzn2.sh "$gh_url/extras/vpnupgrade_amzn.sh" - $wget_c vpnupgrade_ubuntu2.sh "$gh_url/extras/vpnupgrade_ubuntu.sh" - $wget_c vpnupgrade_alpine2.sh "$gh_url/extras/vpnupgrade_alpine.sh" + $wg vpnsetup2.sh "$gh/vpnsetup.sh" + $wg vpnsetup_centos2.sh "$gh/vpnsetup_centos.sh" + $wg vpnsetup_amzn2.sh "$gh/vpnsetup_amzn.sh" + $wg vpnsetup_ubuntu2.sh "$gh/vpnsetup_ubuntu.sh" + $wg vpnsetup_alpine2.sh "$gh/vpnsetup_alpine.sh" + $wg quickstart2.sh "$gh/extras/quickstart.sh" + $wg ikev2setup2.sh "$gh/extras/ikev2setup.sh" + $wg vpnupgrade2.sh "$gh/extras/vpnupgrade.sh" + $wg vpnupgrade_centos2.sh "$gh/extras/vpnupgrade_centos.sh" + $wg vpnupgrade_amzn2.sh "$gh/extras/vpnupgrade_amzn.sh" + $wg vpnupgrade_ubuntu2.sh "$gh/extras/vpnupgrade_ubuntu.sh" + $wg vpnupgrade_alpine2.sh "$gh/extras/vpnupgrade_alpine.sh" + $wg vpnuninstall2.sh "$gh/extras/vpnuninstall.sh" - curl -fsSI https://bit.ly/addvpnuser | grep -q 'add_vpn_user.sh' - curl -fsSI https://bit.ly/delvpnuser | grep -q 'del_vpn_user.sh' - curl -fsSI https://bit.ly/updatevpnusers | grep -q 'update_vpn_users.sh' - - diff vpnsetup.sh ../vpnsetup.sh - diff vpnsetup_centos.sh ../vpnsetup_centos.sh - diff vpnsetup_amzn.sh ../vpnsetup_amzn.sh - diff vpnsetup_ubuntu.sh ../vpnsetup_ubuntu.sh - diff vpnsetup_alpine.sh ../vpnsetup_alpine.sh - diff quickstart.sh ../extras/quickstart.sh - diff ikev2setup.sh ../extras/ikev2setup.sh - diff vpnupgrade.sh ../extras/vpnupgrade.sh + diff vpnsetup.sh ../vpnsetup.sh + diff vpnsetup_centos.sh ../vpnsetup_centos.sh + diff vpnsetup_amzn.sh ../vpnsetup_amzn.sh + diff vpnsetup_ubuntu.sh ../vpnsetup_ubuntu.sh + diff vpnsetup_alpine.sh ../vpnsetup_alpine.sh + diff quickstart.sh ../extras/quickstart.sh + diff ikev2setup.sh ../extras/ikev2setup.sh + diff vpnupgrade.sh ../extras/vpnupgrade.sh diff vpnupgrade_centos.sh ../extras/vpnupgrade_centos.sh - diff vpnupgrade_amzn.sh ../extras/vpnupgrade_amzn.sh + diff vpnupgrade_amzn.sh ../extras/vpnupgrade_amzn.sh diff vpnupgrade_ubuntu.sh ../extras/vpnupgrade_ubuntu.sh diff vpnupgrade_alpine.sh ../extras/vpnupgrade_alpine.sh + diff vpnuninstall.sh ../extras/vpnuninstall.sh - diff vpnsetup2.sh ../vpnsetup.sh - diff vpnsetup_centos2.sh ../vpnsetup_centos.sh - diff vpnsetup_amzn2.sh ../vpnsetup_amzn.sh - diff vpnsetup_ubuntu2.sh ../vpnsetup_ubuntu.sh - diff vpnsetup_alpine2.sh ../vpnsetup_alpine.sh - diff quickstart2.sh ../extras/quickstart.sh - diff ikev2setup2.sh ../extras/ikev2setup.sh - diff vpnupgrade2.sh ../extras/vpnupgrade.sh + diff vpnsetup2.sh ../vpnsetup.sh + diff vpnsetup_centos2.sh ../vpnsetup_centos.sh + diff vpnsetup_amzn2.sh ../vpnsetup_amzn.sh + diff vpnsetup_ubuntu2.sh ../vpnsetup_ubuntu.sh + diff vpnsetup_alpine2.sh ../vpnsetup_alpine.sh + diff quickstart2.sh ../extras/quickstart.sh + diff ikev2setup2.sh ../extras/ikev2setup.sh + diff vpnupgrade2.sh ../extras/vpnupgrade.sh diff vpnupgrade_centos2.sh ../extras/vpnupgrade_centos.sh - diff vpnupgrade_amzn2.sh ../extras/vpnupgrade_amzn.sh + diff vpnupgrade_amzn2.sh ../extras/vpnupgrade_amzn.sh diff vpnupgrade_ubuntu2.sh ../extras/vpnupgrade_ubuntu.sh diff vpnupgrade_alpine2.sh ../extras/vpnupgrade_alpine.sh + diff vpnuninstall2.sh ../extras/vpnuninstall.sh + + bl="https://bit.ly" + curl -fsSI "$bl/addvpnuser" | grep -q 'add_vpn_user.sh' + curl -fsSI "$bl/delvpnuser" | grep -q 'del_vpn_user.sh' + curl -fsSI "$bl/updatevpnusers" | grep -q 'update_vpn_users.sh' test_set_1: needs: [shellcheck, check_urls]