fix(脚本): 修改创建快捷方式时,可能出现的bug
parent
4b0426d3f6
commit
4f0d5a33a1
14
install.sh
14
install.sh
|
@ -3368,17 +3368,27 @@ aliasInstall() {
|
||||||
|
|
||||||
if [[ -f "$HOME/install.sh" ]] && [[ -d "/etc/v2ray-agent" ]] && grep <$HOME/install.sh -q "作者:mack-a"; then
|
if [[ -f "$HOME/install.sh" ]] && [[ -d "/etc/v2ray-agent" ]] && grep <$HOME/install.sh -q "作者:mack-a"; then
|
||||||
mv "$HOME/install.sh" /etc/v2ray-agent/install.sh
|
mv "$HOME/install.sh" /etc/v2ray-agent/install.sh
|
||||||
if [[ -d "/usr/bin/" ]] && [[ ! -f "/usr/bin/vasma" ]]; then
|
local vasmaType=
|
||||||
|
if [[ -d "/usr/bin/" ]] ; then
|
||||||
|
if [[ ! -f "/usr/bin/vasma" ]];then
|
||||||
ln -s /etc/v2ray-agent/install.sh /usr/bin/vasma
|
ln -s /etc/v2ray-agent/install.sh /usr/bin/vasma
|
||||||
chmod 700 /usr/bin/vasma
|
chmod 700 /usr/bin/vasma
|
||||||
|
vasmaType=true
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf "$HOME/install.sh"
|
rm -rf "$HOME/install.sh"
|
||||||
elif [[ -d "/usr/sbin" ]] && [[ ! -f "/usr/sbin/vasma" ]]; then
|
elif [[ -d "/usr/sbin" ]] ; then
|
||||||
|
if [[ ! -f "/usr/sbin/vasma" ]];then
|
||||||
ln -s /etc/v2ray-agent/install.sh /usr/sbin/vasma
|
ln -s /etc/v2ray-agent/install.sh /usr/sbin/vasma
|
||||||
chmod 700 /usr/sbin/vasma
|
chmod 700 /usr/sbin/vasma
|
||||||
|
vasmaType=true
|
||||||
|
fi
|
||||||
rm -rf "$HOME/install.sh"
|
rm -rf "$HOME/install.sh"
|
||||||
fi
|
fi
|
||||||
|
if [[ "${vasmaType}" == "true" ]];then
|
||||||
echoContent green "快捷方式创建成功,可执行[vasma]重新打开脚本"
|
echoContent green "快捷方式创建成功,可执行[vasma]重新打开脚本"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# 检查ipv6、ipv4
|
# 检查ipv6、ipv4
|
||||||
|
|
Loading…
Reference in New Issue