feat(脚本): 添加快捷方式、修改只安装0或者只安装3时报错问题
parent
3dd3d97cae
commit
9a519f15ad
36
install.sh
36
install.sh
|
@ -1716,6 +1716,13 @@ unInstall(){
|
||||||
|
|
||||||
rm -rf /etc/v2ray-agent
|
rm -rf /etc/v2ray-agent
|
||||||
rm -rf /etc/nginx/conf.d/alone.conf
|
rm -rf /etc/nginx/conf.d/alone.conf
|
||||||
|
if [[ -f "/root/.bashrc" ]] && [[ ! -z `cat /root/.bashrc|grep "/etc/v2ray-agent/install.sh"` ]]
|
||||||
|
then
|
||||||
|
lineNumber=`nl -b a .bashrc |grep /etc/v2ray-agent/install.sh|awk '{print $1}'`
|
||||||
|
sed -i "${lineNumber}d" /root/.bashrc
|
||||||
|
source /etc/profile
|
||||||
|
echoContent green " ---> 卸载快捷方式完成"
|
||||||
|
fi
|
||||||
echoContent green " ---> 卸载V2Ray完成"
|
echoContent green " ---> 卸载V2Ray完成"
|
||||||
echoContent green " ---> 卸载完成"
|
echoContent green " ---> 卸载完成"
|
||||||
}
|
}
|
||||||
|
@ -1927,6 +1934,7 @@ customInstall(){
|
||||||
totalProgress=17
|
totalProgress=17
|
||||||
globalType=vlesstcpws
|
globalType=vlesstcpws
|
||||||
mkdirTools 1
|
mkdirTools 1
|
||||||
|
aliasInstall
|
||||||
installTools 2
|
installTools 2
|
||||||
# 申请tls
|
# 申请tls
|
||||||
initTLSNginxConfig 3
|
initTLSNginxConfig 3
|
||||||
|
@ -1977,6 +1985,10 @@ initCustomInstallType(){
|
||||||
then
|
then
|
||||||
while read row
|
while read row
|
||||||
do
|
do
|
||||||
|
if [[ ! -z `echo ${row}|grep VLESS_TCP_inbounds` ]]
|
||||||
|
then
|
||||||
|
customInstallType=${customInstallType}'0'
|
||||||
|
fi
|
||||||
if [[ ! -z `echo ${row}|grep VLESS_WS_inbounds` ]]
|
if [[ ! -z `echo ${row}|grep VLESS_WS_inbounds` ]]
|
||||||
then
|
then
|
||||||
customInstallType=${customInstallType}'1'
|
customInstallType=${customInstallType}'1'
|
||||||
|
@ -1997,7 +2009,7 @@ menu(){
|
||||||
cd
|
cd
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
echoContent green "作者:mack-a"
|
||||||
echoContent green "当前版本:v2.0.20"
|
echoContent green "当前版本:v2.0.21"
|
||||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:七合一共存脚本"
|
echoContent green "描述:七合一共存脚本"
|
||||||
echoContent red "=============================================================="
|
echoContent red "=============================================================="
|
||||||
|
@ -2020,6 +2032,7 @@ menu(){
|
||||||
echoContent red "=============================================================="
|
echoContent red "=============================================================="
|
||||||
automaticUpgrade
|
automaticUpgrade
|
||||||
initCustomInstallType
|
initCustomInstallType
|
||||||
|
|
||||||
read -p "请选择:" selectInstallType
|
read -p "请选择:" selectInstallType
|
||||||
case ${selectInstallType} in
|
case ${selectInstallType} in
|
||||||
1)
|
1)
|
||||||
|
@ -2136,12 +2149,33 @@ checkLog(){
|
||||||
sleep 2
|
sleep 2
|
||||||
menu
|
menu
|
||||||
}
|
}
|
||||||
|
# 脚本快捷方式
|
||||||
|
aliasInstall(){
|
||||||
|
if [[ -f "/root/install.sh" ]] && [[ -d "/etc/v2ray-agent" ]] && [[ ! -z `cat /root/install.sh|grep "作者:mack-a"` ]]
|
||||||
|
then
|
||||||
|
|
||||||
|
cp -Rf /root/install.sh /etc/v2ray-agent/install.sh
|
||||||
|
rm -rf /root/install.sh
|
||||||
|
if [[ ! -f "/root/.bashrc" ]]
|
||||||
|
then
|
||||||
|
touch /root/.bashrc
|
||||||
|
fi
|
||||||
|
if [[ -z `cat /root/.bashrc|grep '/etc/v2ray-agent/install.sh'` ]]
|
||||||
|
then
|
||||||
|
echo alias vas=\'bash /etc/v2ray-agent/install.sh\' >> /root/.bashrc
|
||||||
|
fi
|
||||||
|
source /etc/profile
|
||||||
|
else
|
||||||
|
echo noAliasInstall
|
||||||
|
fi
|
||||||
|
}
|
||||||
# 默认安装
|
# 默认安装
|
||||||
defaultInstall(){
|
defaultInstall(){
|
||||||
customInstallType=
|
customInstallType=
|
||||||
totalProgress=17
|
totalProgress=17
|
||||||
globalType=vlesstcpws
|
globalType=vlesstcpws
|
||||||
mkdirTools 1
|
mkdirTools 1
|
||||||
|
aliasInstall
|
||||||
installTools 2
|
installTools 2
|
||||||
# 申请tls
|
# 申请tls
|
||||||
initTLSNginxConfig 3
|
initTLSNginxConfig 3
|
||||||
|
|
Loading…
Reference in New Issue