Skip to content

Commit

Permalink
Merge pull request #13 from LovelyHaochi/master
Browse files Browse the repository at this point in the history
fix "ip: Command not found" (2)
  • Loading branch information
ellermister authored Jan 20, 2021
2 parents ea519e2 + 28bc2c1 commit b966724
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions mtproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,6 @@ stop_mtp(){
fix_mtp(){
if [ `id -u` != 0 ];then
echo -e "> ※ (该功能仅限 root 用户执行)"
fi

print_line
echo -e "> 开始安装/更新Iproute2..."
print_line

if check_sys packageManager yum; then
yum update -y
yum install -y iproute
elif check_sys packageManager apt; then
apt-get update -y
apt-get install -y iproute2
fi

print_line
Expand All @@ -337,6 +325,21 @@ fix_mtp(){
apt-get remove -y iptables
ufw disable
fi

print_line
echo -e "> 开始安装/更新iproute2..."
print_line

if check_sys packageManager yum; then
yum install -y epel-release
yum update -y
yum install -y iproute
elif check_sys packageManager apt; then
apt-get install -y epel-release
apt-get update -y
apt-get install -y iproute2
fi

echo -e "< 处理完毕,如有报错忽略即可..."
echo -e "< 如遇到端口冲突,请自行关闭相关程序"
}
Expand Down

0 comments on commit b966724

Please sign in to comment.