From 5b6ed0db805ccc4644fb1dbda7dec8e6cf730bc8 Mon Sep 17 00:00:00 2001 From: sindricn Date: Wed, 1 Oct 2025 22:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 5 ++++- scripts/common.sh | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index b00bd5a..2d81aef 100644 --- a/install.sh +++ b/install.sh @@ -76,7 +76,10 @@ check_network_connection() { # 检查必要的命令 check_required_commands() { local missing_commands=() - local required_commands=("curl" "systemctl") + local required_commands=("curl") + + # systemctl 不是必需的(Windows环境下可能没有) + # 只检查 curl for cmd in "${required_commands[@]}"; do if ! command -v "$cmd" &> /dev/null; then diff --git a/scripts/common.sh b/scripts/common.sh index 3241ae4..52f34ea 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -11,10 +11,10 @@ if [[ -z "${SCRIPT_NAME:-}" ]]; then readonly SCRIPT_NAME="${0##*/}" fi if [[ -z "${LOG_DIR:-}" ]]; then - readonly LOG_DIR="/var/log/s-hy2" + LOG_DIR="/var/log/s-hy2" fi if [[ -z "${LOG_FILE:-}" ]]; then - readonly LOG_FILE="$LOG_DIR/s-hy2.log" + LOG_FILE="$LOG_DIR/s-hy2.log" fi if [[ -z "${PID_FILE:-}" ]]; then readonly PID_FILE="/var/run/s-hy2.pid"