diff options
Diffstat (limited to 'pkg')
-rwxr-xr-x | pkg/osx/scripts/postinstall | 12 | ||||
-rwxr-xr-x | pkg/osx/scripts/preinstall | 11 |
2 files changed, 18 insertions, 5 deletions
diff --git a/pkg/osx/scripts/postinstall b/pkg/osx/scripts/postinstall index 9c2176b2..393ab658 100755 --- a/pkg/osx/scripts/postinstall +++ b/pkg/osx/scripts/postinstall @@ -1,6 +1,12 @@ #!/bin/sh # Bitmask Post-Instalation script -cp se.leap.bitmask-helper.plist /Library/LaunchDaemons/ -launchctl load /Library/LaunchDaemons/se.leap.bitmask-helper.plist || echo "Already loaded, skipping..." -echo `date` "::Bitmask post-installation script succeeded." >> /tmp/bitmask-install.log +# (c) LEAP Encryption access Project +# We copy the bitmask-helper plist to the LaunchDaemons folder, and load the bitmask-helper that runs as root. + +LOG=/tmp/bitmask-install.log + +cp se.leap.bitmask-helper.plist /Library/LaunchDaemons/ \ + && echo `date` ":: Bitmask post-install: copied bitmask-helper Plist." >> $LOG +launchctl load /Library/LaunchDaemons/se.leap.bitmask-helper.plist && echo `date` ":: Bitmask post-install: loaded bitmask-helper." >> $LOG +echo `date` ":: Bitmask post-install: ok." >> $LOG exit 0 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 |