From f81d41682ec26c489264351679924fae76884a3d Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 4 Jul 2018 01:29:39 +0200 Subject: [pkg] import more osx boilerplate --- osx/scripts/postinstall | 13 +++++++++++++ osx/scripts/preinstall | 12 ++++++++++++ osx/scripts/se.leap.bitmask-helper.plist | 26 ++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100755 osx/scripts/postinstall create mode 100755 osx/scripts/preinstall create mode 100644 osx/scripts/se.leap.bitmask-helper.plist (limited to 'osx/scripts') diff --git a/osx/scripts/postinstall b/osx/scripts/postinstall new file mode 100755 index 0000000..9343039 --- /dev/null +++ b/osx/scripts/postinstall @@ -0,0 +1,13 @@ +#!/bin/sh +# Bitmask Post-Instalation script +# (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 + +chmod +x /Applications/RiseupVPN.app/Contents/Resources/bitmask-helper/bitmask-helper +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/osx/scripts/preinstall b/osx/scripts/preinstall new file mode 100755 index 0000000..1ae68f9 --- /dev/null +++ b/osx/scripts/preinstall @@ -0,0 +1,12 @@ +#!/bin/sh +# Bitmask Pre-Instalation script +# (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 diff --git a/osx/scripts/se.leap.bitmask-helper.plist b/osx/scripts/se.leap.bitmask-helper.plist new file mode 100644 index 0000000..8ebfb94 --- /dev/null +++ b/osx/scripts/se.leap.bitmask-helper.plist @@ -0,0 +1,26 @@ + + + + + WorkingDirectory + /Applications/RiseupVPN.app/Contents/Resources/bitmask-helper/ + StandardOutPath + bitmask-helper.log + StandardErrorPath + bitmask-helper-err.log + GroupName + daemon + RunAtLoad + + SessionCreate + + KeepAlive + + ThrottleInterval + 5 + Label + se.leap.BitmaskHelper + Program + /Applications/RiseupVPN.app/Contents/Resources/bitmask-helper/bitmask-helper + + -- cgit v1.2.3