💥 Prevent mainland China servers from running install.sh (#147)
💥 防止中国大陆服务器运行一键安装脚本
Co-authored-by: Xtao_dada <xtao@xtaolink.cn>
This commit is contained in:
parent
0b0bc44b27
commit
21a5ce0d6f
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user