From 2fee73e269357e363fc66ba41ffe78b1cb65e94d Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sun, 4 Oct 2020 13:33:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/install.sh b/install.sh index 230d271..3bb498d 100644 --- a/install.sh +++ b/install.sh @@ -1504,6 +1504,9 @@ menu(){ 8) bbrInstall ;; + 9) + checkLog 1 + ;; 10) unInstall 1 ;; @@ -1525,6 +1528,63 @@ bbrInstall(){ menu fi } +# 查看、检查日志 +checkLog(){ + echoContent skyBlue "\n功能 $1/${totalProgress} : 查看日志" + echoContent red "\n==============================================================" + echoContent skyBlue "--------V2Ray--------" + echoContent yellow "1.查看V2Ray Info日志" + echoContent yellow "2.监听V2Ray Info日志" + echoContent yellow "3.查看V2Ray Error日志" + echoContent yellow "4.监听V2Ray Error日志" + echoContent yellow "5.清空V2Ray日志" + echoContent skyBlue "------Trojan-Go------" + echoContent yellow "6.查看Trojan-Go日志" + echoContent yellow "7.监听Trojan-GO日志" + echoContent yellow "8.清空Trojan-GO日志" + echoContent skyBlue "--------Nginx--------" + echoContent yellow "9.查看Nginx日志" + echoContent yellow "10.清空Nginx日志" + echoContent red "==============================================================" + read -p "请选择:" selectLogType + case ${selectLogType} in + 1) + cat /etc/v2ray-agent/v2ray/v2ray_access.log + ;; + 2) + tail -f /etc/v2ray-agent/v2ray/v2ray_access.log + ;; + 3) + cat /etc/v2ray-agent/v2ray/v2ray_error.log + ;; + 4) + tail -f /etc/v2ray-agent/v2ray/v2ray_error.log + ;; + 5) + echo '' > /etc/v2ray-agent/v2ray/v2ray_access.log + echo '' > /etc/v2ray-agent/v2ray/v2ray_error.log + echoContent green " ---> 清空完毕" + ;; + 6) + cat /etc/v2ray-agent/trojan/trojan.log + ;; + 7) + tail -f /etc/v2ray-agent/trojan/trojan.log + ;; + 8) + echo '' > /etc/v2ray-agent/trojan/trojan.log + echoContent green " ---> 清空完毕" + ;; + 9) + cat /var/log/nginx/access.log + ;; + 10) + echo '' > /var/log/nginx/access.log + ;; + esac + sleep 2 + menu +} installV2RayVLESSTCPWSTLS(){ totalProgress=17 globalType=vlesstcpws