From 9564745c57f90340df92ced64b0244a98842e9c4 Mon Sep 17 00:00:00 2001 From: Ben Toews Date: Wed, 13 Jun 2018 08:54:11 -0600 Subject: [PATCH] unload kext by bundle-name in preinstall script --- install-scripts/preinstall | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install-scripts/preinstall b/install-scripts/preinstall index 5e834df..5a6e980 100755 --- a/install-scripts/preinstall +++ b/install-scripts/preinstall @@ -1,12 +1,11 @@ #!/bin/bash -KEXT_DIR="/Library/Extensions" -KEXT="$KEXT_DIR/softu2f.kext" +KEXT_BUNDLE="com.github.SoftU2FDriver" LAUNCH_AGENT_PLIST="$HOME/Library/LaunchAgents/com.github.SoftU2F.plist" # This directory should already exist, but some users have had issues with it # being missing. mkdir -p $KEXT_DIR -kextunload $KEXT || true +kextunload -b $KEXT_BUNDLE || true sudo -u "${USER}" launchctl unload $LAUNCH_AGENT_PLIST || true