修复
This commit is contained in:
+4
-1
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user