From 226b847397071a5905138dc0024ae493eb6deee0 Mon Sep 17 00:00:00 2001 From: NekoRectifier Date: Tue, 12 Dec 2023 18:18:56 +0800 Subject: [PATCH] feat: check logs folder integrity --- shutdown.sh | 3 --- start.sh | 9 +++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/shutdown.sh b/shutdown.sh index c2ba4e7..3b8ffd9 100755 --- a/shutdown.sh +++ b/shutdown.sh @@ -8,7 +8,4 @@ if [ $PID_NUM -ne 0 ]; then # ps -ef | grep [c]lash-linux-a | awk '{print $2}' | xargs kill -9 fi -# 清除环境变量 -> /etc/profile.d/clash.sh - echo -e "\n服务关闭成功,请执行以下命令关闭系统代理:proxy_off\n" diff --git a/start.sh b/start.sh index a6a2a9f..39380b3 100755 --- a/start.sh +++ b/start.sh @@ -16,8 +16,6 @@ chmod +x $Server_Dir/bin/* chmod +x $Server_Dir/scripts/* chmod +x $Server_Dir/tools/subconverter/subconverter - - #################### 变量设置 #################### Conf_Dir="$Server_Dir/conf" @@ -94,8 +92,11 @@ unset HTTPS_PROXY unset NO_PROXY # create logs folder -mkdir logs - +if [ -d $Server_Dir"/logs" ]; then + echo "logs folder exists." +else + mkdir logs +fi ## Clash 订阅地址检测及配置文件下载 # 检查url是否有效