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
This commit is contained in:
alexia authored and GitHub committed 2023-02-09 19:06:17 +01:00
1 parent 0be469d16a
commit 294732e99b
1 file changed
+8
+8
View File
@@ -350,6 +350,10 @@ _kill_if_running() {
} }
_exit_handler() { _exit_handler() {
if [ "$os" = "Darwin" ]; then
killall -CONT AMPDevicesAgent AMPDeviceDiscoveryAgent MobileDeviceUpdater || true
fi
[ $? -eq 0 ] && exit [ $? -eq 0 ] && exit
echo "[-] An error occurred" echo "[-] An error occurred"
@@ -449,6 +453,10 @@ chmod +x "$dir"/*
# xattr -d com.apple.quarantine "$dir"/* # xattr -d com.apple.quarantine "$dir"/*
#fi #fi
if [ "$os" = "Darwin" ]; then
killall -STOP AMPDevicesAgent AMPDeviceDiscoveryAgent MobileDeviceUpdater || true
fi
if [ "$clean" = "1" ]; then if [ "$clean" = "1" ]; then
rm -rf boot* work .tweaksinstalled rm -rf boot* work .tweaksinstalled
echo "[*] Removed the created boot files" echo "[*] Removed the created boot files"