💥 Prevent mainland China servers from running install.sh (#147)

💥 防止中国大陆服务器运行一键安装脚本

Co-authored-by: Xtao_dada <xtao@xtaolink.cn>
This commit is contained in:
F2DRD 2021-11-14 19:52:57 +08:00 committed by GitHub
parent 0b0bc44b27
commit 21a5ce0d6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,13 @@ if [[ $EUID -ne 0 ]]; then
exit 1 exit 1
fi fi
a=$(curl --noproxy '*' -sSL https://api.myip.com/)
b="China"
if [[ $a == *$b* ]]
then
exit 1
fi
check_sys() { check_sys() {
if [[ -f /etc/redhat-release ]]; then if [[ -f /etc/redhat-release ]]; then
release="centos" release="centos"