This commit is contained in:
sindricn
2025-10-01 22:05:24 +08:00
parent 9f0d6abf7c
commit 5b6ed0db80
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -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
+2 -2
View File
@@ -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"