feat(脚本): 删除内容
parent
241eb7e1ad
commit
4a55872474
|
@ -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
|
||||||
|
@ -907,7 +907,7 @@ handleTrojanGo(){
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
if [[ "$1" = "start" ]]
|
if [[ "$1" = "start" ]]
|
||||||
then
|
then
|
||||||
if [[ ! -z `ps -ef|grep -v grep|grep trojan-go ` ]]
|
if [[ ! -z `ps -ef|grep -v grep|grep trojan-go` ]]
|
||||||
then
|
then
|
||||||
echoContent green " ---> Trojan-Go启动成功"
|
echoContent green " ---> Trojan-Go启动成功"
|
||||||
else
|
else
|
||||||
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue