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"