summaryrefslogtreecommitdiff
path: root/pkg/osx/scripts/preinstall
diff options
context:
space:
mode:
authorkali <kali@leap.se>2017-08-05 15:36:21 -0700
committerKali Kaneko <kali@leap.se>2017-08-14 18:09:49 -0400
commitc035917e5318ac494c8b9e7d9fdf09ddcb424006 (patch)
treefb6c45d4553ef1fb2fe554840c8a7df871e7496b /pkg/osx/scripts/preinstall
parent2dec0bfe57c84cbd9751c1c8dd89be61cb994bfb (diff)
[pkg] improve logging for the osx install scripts
Diffstat (limited to 'pkg/osx/scripts/preinstall')
-rwxr-xr-xpkg/osx/scripts/preinstall11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkg/osx/scripts/preinstall b/pkg/osx/scripts/preinstall
index 222922cf..1ae68f9c 100755
--- a/pkg/osx/scripts/preinstall
+++ b/pkg/osx/scripts/preinstall
@@ -1,5 +1,12 @@
#!/bin/sh
# Bitmask Pre-Instalation script
-[[ -f /Library/LaunchDaemons/se.leap.bitmask-helper.plist ]] && launchctl unload /Library/LaunchDaemons/se.leap.bitmask-helper.plist
-echo `date` "::Bitmask pre-installation script succeeded." >> /tmp/bitmask-install.log
+# (c) LEAP Encryption access Project
+# We unload the bitmask-helper if it is running, because we can be installing an upgrade.
+
+LOG=/tmp/bitmask-install.log
+
+ps aux | grep [b]itmask-helper \
+ && launchctl unload /Library/LaunchDaemons/se.leap.bitmask-helper.plist \
+ && echo `date` ":: Bitmask pre-install: unloaded bitmask-helper." >> $LOG
+echo `date` ":: Bitmask pre-install: ok." >> $LOG
exit 0