From 21a5ce0d6fa7ee8b3e76c082811aab8903976140 Mon Sep 17 00:00:00 2001 From: F2DRD <53929319+newkld@users.noreply.github.com> Date: Sun, 14 Nov 2021 19:52:57 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20Prevent=20mainland=20China=20ser?= =?UTF-8?q?vers=20from=20running=20install.sh=20(#147)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💥 防止中国大陆服务器运行一键安装脚本 Co-authored-by: Xtao_dada --- install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install.sh b/install.sh index 22f224b..d3086df 100644 --- a/install.sh +++ b/install.sh @@ -5,6 +5,13 @@ if [[ $EUID -ne 0 ]]; then exit 1 fi +a=$(curl --noproxy '*' -sSL https://api.myip.com/) +b="China" +if [[ $a == *$b* ]] +then + exit 1 +fi + check_sys() { if [[ -f /etc/redhat-release ]]; then release="centos"