From 8ac59c48d62fddb7fe1dec6239ed8d6715d38d36 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 5 Mar 2022 06:06:43 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20Prevent=20mainland=20China=20ser?= =?UTF-8?q?vers=20from=20running=20docker.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💥 防止中国大陆服务器运行 docker 一键安装脚本 Signed-off-by: xtaodada --- utils/docker.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/docker.sh b/utils/docker.sh index 30b4f69..bcada6d 100644 --- a/utils/docker.sh +++ b/utils/docker.sh @@ -7,6 +7,14 @@ then exit 1 fi +a=$(curl --noproxy '*' -sSL https://api.myip.com/) +b="China" +if [[ $a == *$b* ]] +then + echo "错误:本脚本不支持境内服务器使用。" 1>&2 + exit 1 +fi + welcome () { echo echo "安装即将开始"