From a02fc06f81d7032b321b76039712ab6c450fdd7b Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 18 Jan 2021 11:00:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=B7=A5=E5=85=B7=E6=97=B6=E7=9A=84=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9D=A1=E4=BB=B6=E3=80=81=E4=BF=AE=E6=94=B9=E5=AE=89?= =?UTF-8?q?=E8=A3=85acme=E6=97=B6=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index fa38c94..c3c3ca3 100644 --- a/install.sh +++ b/install.sh @@ -336,34 +336,34 @@ installTools() { if [[ "${release}" == "centos" ]]; then rm -rf /var/run/yum.pid fi - # [[ -z `find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin |grep -v grep|grep -w curl` ]] + # [[ -z `find /usr/bin /usr/sbin |grep -v grep|grep -w curl` ]] - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w wget; then + if ! find /usr/bin /usr/sbin | grep -q -w wget; then echoContent green " ---> 安装wget" ${installType} wget >/dev/null 2>&1 fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w curl; then + if ! find /usr/bin /usr/sbin | grep -q -w curl; then echoContent green " ---> 安装curl" ${installType} curl >/dev/null 2>&1 fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w unzip; then + if ! find /usr/bin /usr/sbin | grep -q -w unzip; then echoContent green " ---> 安装unzip" ${installType} unzip >/dev/null 2>&1 fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w socat; then + if ! find /usr/bin /usr/sbin | grep -q -w socat; then echoContent green " ---> 安装socat" ${installType} socat >/dev/null 2>&1 fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w tar; then + if ! find /usr/bin /usr/sbin | grep -q -w tar; then echoContent green " ---> 安装tar" ${installType} tar >/dev/null 2>&1 fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w cron; then + if ! find /usr/bin /usr/sbin | grep -q -w cron; then echoContent green " ---> 安装crontabs" if [[ "${release}" == "ubuntu" ]] || [[ "${release}" == "debian" ]]; then ${installType} cron >/dev/null 2>&1 @@ -371,22 +371,22 @@ installTools() { ${installType} crontabs >/dev/null 2>&1 fi fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w jq; then + if ! find /usr/bin /usr/sbin | grep -q -w jq; then echoContent green " ---> 安装jq" ${installType} jq >/dev/null 2>&1 fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w binutils; then + if ! find /usr/bin /usr/sbin | grep -q -w binutils; then echoContent green " ---> 安装binutils" ${installType} binutils >/dev/null 2>&1 fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w ping6; then + if ! find /usr/bin /usr/sbin | grep -q -w ping6; then echoContent green " ---> 安装ping6" ${installType} inetutils-ping >/dev/null 2>&1 fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w nginx; then + if ! find /usr/bin /usr/sbin | grep -q -w nginx; then echoContent green " ---> 安装nginx" if [[ "${centosVersion}" == "8" ]]; then rpm -ivh ${nginxEpel} >/etc/v2ray-agent/error.log 2>&1 @@ -400,7 +400,7 @@ installTools() { fi fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w semanage; then + if ! find /usr/bin /usr/sbin | grep -q -w semanage; then echoContent green " ---> 安装semanage" ${installType} bash-completion >/dev/null 2>&1 if [[ -n "${policyCoreUtils}" ]]; then @@ -412,13 +412,13 @@ installTools() { fi fi - if ! find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin | grep -q -w sudo; then + if ! find /usr/bin /usr/sbin | grep -q -w sudo; then echoContent green " ---> 安装sudo" ${installType} sudo >/dev/null 2>&1 fi # todo 关闭防火墙 - if [[ ! -d "$HOME/.acme.sh" ]]; then + if [[ ! -d "$HOME/.acme.sh" ]] || [[ -d "$HOME/.acme.sh" && -z $(find "$HOME/.acme.sh/acme.sh") ]]; then echoContent green " ---> 安装acme.sh" curl -s https://get.acme.sh | sh >/etc/v2ray-agent/tls/acme.log if [[ -d "$HOME/.acme.sh" ]] && [[ -z $(find "$HOME/.acme.sh/acme.sh") ]]; then @@ -426,7 +426,6 @@ installTools() { echoContent yellow "错误排查:" echoContent red " 1.获取Github文件失败,请等待Gitub恢复后尝试,恢复进度可查看 [https://www.githubstatus.com/]" echoContent red " 2.acme.sh脚本出现bug,可查看[https://github.com/acmesh-official/acme.sh] issues" - echoContent red " 3.反馈给开发者[私聊:https://t.me/mack_a] 或 [提issues]" exit 0 fi fi