mirror of https://github.com/mack-a/v2ray-agent
feat(trojan): 添加trojan脚本
parent
42e5bab639
commit
7ced0c8b63
|
@ -1 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
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 ` ]]
|
||||
then
|
||||
release="centos"
|
||||
installType='yum -y install'
|
||||
removeType='yum -y remove'
|
||||
upgrade="yum update -y"
|
||||
elif [[ ! -z `cat /etc/issue | grep -i "debian" | grep -v grep` ]] || [[ ! -z `cat /proc/version | grep -i "debian" | grep -v grep` ]]
|
||||
then
|
||||
release="debian"
|
||||
installType='apt -y install'
|
||||
upgrade="apt update -y"
|
||||
removeType='apt -y autoremove'
|
||||
elif [[ ! -z `cat /etc/issue | grep -i "ubuntu" | grep -v grep` ]] || [[ ! -z `cat /proc/version | grep -i "ubuntu" | grep -v grep` ]]
|
||||
then
|
||||
release="ubuntu"
|
||||
installType='apt -y install'
|
||||
upgrade="apt update -y"
|
||||
removeType='apt --purge remove'
|
||||
|
||||
fi
|
||||
if [[ -z ${release} ]]
|
||||
then
|
||||
echoContent red "本脚本不支持此系统,请将下方日志反馈给开发者"
|
||||
cat /etc/issue
|
||||
cat /proc/version
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
checkSystem
|
Loading…
Reference in New Issue