From c0da1fa06f294bbc4b1e4e9fded665b829790ed6 Mon Sep 17 00:00:00 2001 From: Raghav Potluri Date: Sat, 30 Aug 2025 22:44:11 -0700 Subject: [PATCH 1/3] fix wrapper script to use relative path on macos Fixes: #898 --- resources/packaging/macos/wrapper.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/packaging/macos/wrapper.sh b/resources/packaging/macos/wrapper.sh index d8cfcc5db..5c283ce03 100755 --- a/resources/packaging/macos/wrapper.sh +++ b/resources/packaging/macos/wrapper.sh @@ -1,2 +1,4 @@ #!/usr/bin/env zsh -osascript -e 'do shell script "/*/Sniffnet.app/Contents/MacOS/sniffnet >/dev/null 2>&1 &" with prompt "Comfortably monitor your Internet traffic." with administrator privileges' +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +SNIFFNET_PATH="$SCRIPT_DIR/sniffnet" +osascript -e "do shell script \"'$(realpath "$SNIFFNET_PATH")' >/dev/null 2>&1 &\" with prompt \"Comfortably monitor your Internet traffic.\" with administrator privileges" From 230b7b9d736a1c301a7de6fe075b7910aa6abd5f Mon Sep 17 00:00:00 2001 From: Raghav Potluri Date: Sun, 31 Aug 2025 09:20:18 -0700 Subject: [PATCH 2/3] remove use of realpath --- resources/packaging/macos/wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/packaging/macos/wrapper.sh b/resources/packaging/macos/wrapper.sh index 5c283ce03..3c26ef9a3 100755 --- a/resources/packaging/macos/wrapper.sh +++ b/resources/packaging/macos/wrapper.sh @@ -1,4 +1,4 @@ #!/usr/bin/env zsh SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" SNIFFNET_PATH="$SCRIPT_DIR/sniffnet" -osascript -e "do shell script \"'$(realpath "$SNIFFNET_PATH")' >/dev/null 2>&1 &\" with prompt \"Comfortably monitor your Internet traffic.\" with administrator privileges" +osascript -e "do shell script \"'$SNIFFNET_PATH' >/dev/null 2>&1 &\" with prompt \"Comfortably monitor your Internet traffic.\" with administrator privileges" From b4d03a84b24191a3ffe7e46004702971053e8ef1 Mon Sep 17 00:00:00 2001 From: Raghav Potluri Date: Sat, 6 Sep 2025 01:22:28 -0700 Subject: [PATCH 3/3] use -P for pwd --- resources/packaging/macos/wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/packaging/macos/wrapper.sh b/resources/packaging/macos/wrapper.sh index 3c26ef9a3..039d4ef45 100755 --- a/resources/packaging/macos/wrapper.sh +++ b/resources/packaging/macos/wrapper.sh @@ -1,4 +1,4 @@ #!/usr/bin/env zsh -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)" SNIFFNET_PATH="$SCRIPT_DIR/sniffnet" osascript -e "do shell script \"'$SNIFFNET_PATH' >/dev/null 2>&1 &\" with prompt \"Comfortably monitor your Internet traffic.\" with administrator privileges"