From 348c4298553dd2f04966a4229baef107363af197 Mon Sep 17 00:00:00 2001 From: ezequielnick <107352853+ezequielnick@users.noreply.github.com> Date: Wed, 13 Aug 2025 18:11:14 +0800 Subject: [PATCH] feat: enable service if previously disabled --- build/pkg-scripts/postinstall | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/pkg-scripts/postinstall b/build/pkg-scripts/postinstall index a557e09..22d566e 100644 --- a/build/pkg-scripts/postinstall +++ b/build/pkg-scripts/postinstall @@ -125,6 +125,13 @@ macos_version=$(sw_vers -productVersion) macos_major=$(echo "$macos_version" | cut -d. -f1) log "macOS version: $macos_version" +# 启用服务(防止安全软件禁用) +if ! launchctl enable system/party.mihomo.helper 2>/dev/null; then + log "Warning: Failed to enable service, continuing installation..." +else + log "Service enabled successfully" +fi + # 清理现有服务 log "Cleaning up existing services..." launchctl bootout system "$LAUNCH_DAEMON" 2>/dev/null || true