feat(脚本): 添加ip
parent
2757737499
commit
c80ef612d7
|
@ -108,16 +108,12 @@ init(){
|
||||||
pingTool
|
pingTool
|
||||||
}
|
}
|
||||||
checkSystem(){
|
checkSystem(){
|
||||||
if [[ ! -z `find /etc -name "redhat-release"` ]] || [[ ! -z `cat /proc/version | grep -i "centos" | grep -v grep ` ]] || [[ ! -z `cat /proc/version | grep -i "red hat" | grep -v grep ` ]] || [[ ! -z `cat /proc/version | grep -i "redhat" | grep -v grep ` ]]
|
if [[ "`uname`" = "Darwin" ]]
|
||||||
then
|
then
|
||||||
centosVersion=`rpm -q centos-release|awk -F "[-]" '{print $3}'`
|
release="Darwin"
|
||||||
release="centos"
|
elif [[ ! -z `find /etc -name "redhat-release"` ]] || [[ ! -z `cat /proc/version | grep -i "centos" | grep -v grep ` ]] || [[ ! -z `cat /proc/version | grep -i "red hat" | grep -v grep ` ]] || [[ ! -z `cat /proc/version | grep -i "redhat" | grep -v grep ` ]]
|
||||||
installType='yum -y install'
|
|
||||||
removeType='yum -y remove'
|
|
||||||
upgrade="yum update -y --skip-broken"
|
|
||||||
elif [[ "`uname`" = "Darwin" ]]
|
|
||||||
then
|
then
|
||||||
release="Darwin"
|
release="centos"
|
||||||
elif [[ ! -z `cat /etc/issue | grep -i "ubuntu" | grep -v grep` ]] || [[ ! -z `cat /proc/version | grep -i "ubuntu" | grep -v grep` ]]
|
elif [[ ! -z `cat /etc/issue | grep -i "ubuntu" | grep -v grep` ]] || [[ ! -z `cat /proc/version | grep -i "ubuntu" | grep -v grep` ]]
|
||||||
then
|
then
|
||||||
release="ubuntu"
|
release="ubuntu"
|
||||||
|
@ -134,5 +130,12 @@ checkSystem(){
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
downloadIPs(){
|
||||||
|
echoContent yellow '开始下载ip文件'
|
||||||
|
wget -q -P /tmp/ https://raw.githubusercontent.com/mack-a/v2ray-agent/dev/fodder/ips/ips
|
||||||
|
echoContent yellow '下载结束'
|
||||||
|
}
|
||||||
|
downloadIPs
|
||||||
checkSystem
|
checkSystem
|
||||||
init
|
init
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue