From 294732e99b864224f1ae37d6b2c09a2e5014afa0 Mon Sep 17 00:00:00 2001 From: alexia Date: Thu, 9 Feb 2023 19:06:17 +0100 Subject: [PATCH] Prevent Finder from popping up while palera1n is running (#352) * Prevent Finder from popping up while palera1n is running * Make sure Finder resets after a reboot if the exit handler doesn't run * Make killall non-fatal --- palera1n.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/palera1n.sh b/palera1n.sh index a9f65ed..9cbb352 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -350,6 +350,10 @@ _kill_if_running() { } _exit_handler() { + if [ "$os" = "Darwin" ]; then + killall -CONT AMPDevicesAgent AMPDeviceDiscoveryAgent MobileDeviceUpdater || true + fi + [ $? -eq 0 ] && exit echo "[-] An error occurred" @@ -449,6 +453,10 @@ chmod +x "$dir"/* # xattr -d com.apple.quarantine "$dir"/* #fi +if [ "$os" = "Darwin" ]; then + killall -STOP AMPDevicesAgent AMPDeviceDiscoveryAgent MobileDeviceUpdater || true +fi + if [ "$clean" = "1" ]; then rm -rf boot* work .tweaksinstalled echo "[*] Removed the created boot files"