feat(脚本): 删除内容

pull/534/merge
mack-a 2020-09-25 17:42:16 +08:00
parent 241eb7e1ad
commit 4a55872474
1 changed files with 4 additions and 4 deletions

View File

@ -97,6 +97,7 @@ installTools(){
# yum-utils # yum-utils
if [[ "${centosVersion}" = "8" ]] if [[ "${centosVersion}" = "8" ]]
then then
upgrade="yum update -y --skip-broken --nobest"
installType="yum -y install --nobest" installType="yum -y install --nobest"
${installType} yum-utils > /etc/v2ray-agent/error.log 2>&1 ${installType} yum-utils > /etc/v2ray-agent/error.log 2>&1
else else
@ -120,7 +121,6 @@ installTools(){
# then # then
# yum-complete-transaction --cleanup-only # yum-complete-transaction --cleanup-only
# fi # fi
${upgrade} > /dev/null ${upgrade} > /dev/null
if [[ "${release}" = "centos" ]] if [[ "${release}" = "centos" ]]
then then
@ -898,7 +898,7 @@ handleTrojanGo(){
then then
if [[ -z `ps -ef|grep -v grep|grep trojan-go` ]] && [[ "$1" = "start" ]] if [[ -z `ps -ef|grep -v grep|grep trojan-go` ]] && [[ "$1" = "start" ]]
then then
/usr/bin/trojan/trojan-go -config /etc/v2ray-agent/trojan/config.json & > /dev/null 2>&1 /etc/v2ray-agent/trojan/trojan-go -config /etc/v2ray-agent/trojan/config.json & > /dev/null 2>&1
elif [[ ! -z `ps -ef|grep -v grep|grep trojan-go` ]] && [[ "$1" = "stop" ]] elif [[ ! -z `ps -ef|grep -v grep|grep trojan-go` ]] && [[ "$1" = "stop" ]]
then then
ps -ef|grep -v grep|grep trojan-go|awk '{print $2}'|xargs kill -9 ps -ef|grep -v grep|grep trojan-go|awk '{print $2}'|xargs kill -9
@ -1538,7 +1538,7 @@ killSleep(){
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 [[ ! -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 then
centosVersion=`rpm -q centos-release|awk -F "[-]" '{print $3}'` centosVersion=`rpm -q centos-release|awk -F "[-]" '{print $3}'|awk -F "[.]" '{print $1}'`
release="centos" release="centos"
installType='yum -y install' installType='yum -y install'
removeType='yum -y remove' removeType='yum -y remove'