From 94503fd41fbf4d795765b281029a081091d463c0 Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Fri, 27 Oct 2023 12:02:46 +0200 Subject: [PATCH] Fix Mac pkg source check --- release_files/darwin-ui-installer.sh | 8 -------- release_files/darwin_pkg/preinstall | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/release_files/darwin-ui-installer.sh b/release_files/darwin-ui-installer.sh index 58cbf8749dd..5179f02d6ed 100644 --- a/release_files/darwin-ui-installer.sh +++ b/release_files/darwin-ui-installer.sh @@ -11,14 +11,6 @@ then wiretrustee service uninstall || true fi -# check if it was installed with brew -brew list --formula | grep netbird -if [ $? -eq 0 ] -then - echo "NetBird has been installed with Brew. Please use Brew to update the package." - exit 1 -fi - # check if netbird is installed NB_BIN=$(which netbird) if [ -z "$NB_BIN" ] diff --git a/release_files/darwin_pkg/preinstall b/release_files/darwin_pkg/preinstall index cdea1465c21..5965e82ebe4 100755 --- a/release_files/darwin_pkg/preinstall +++ b/release_files/darwin_pkg/preinstall @@ -8,6 +8,13 @@ AGENT=/usr/local/bin/netbird mkdir -p /var/log/netbird/ { + # check if it was installed with brew + brew list --formula | grep netbird + if [ $? -eq 0 ] + then + echo "NetBird has been installed with Brew. Please use Brew to update the package." + exit 1 + fi osascript -e 'quit app "Netbird"' || true $AGENT service stop || true