summaryrefslogtreecommitdiff
path: root/pkg/osx/scripts
diff options
context:
space:
mode:
authorkali <kali@leap.se>2017-08-03 21:01:34 -0700
committerKali Kaneko <kali@leap.se>2017-08-14 18:09:15 -0400
commit201a751f0a0da9fa0427d683cb56725a40a00d89 (patch)
tree3c148c489cceb71ccbb9c0a8d37a331506001b67 /pkg/osx/scripts
parent9c74ffb925325de98e8dd73acdf1602dd40bfcc0 (diff)
[pkg] automate flat package
Diffstat (limited to 'pkg/osx/scripts')
-rwxr-xr-xpkg/osx/scripts/postinstall6
-rwxr-xr-xpkg/osx/scripts/preinstall5
-rw-r--r--pkg/osx/scripts/se.leap.bitmask-helper.plist29
3 files changed, 40 insertions, 0 deletions
diff --git a/pkg/osx/scripts/postinstall b/pkg/osx/scripts/postinstall
new file mode 100755
index 0000000..9c2176b
--- /dev/null
+++ b/pkg/osx/scripts/postinstall
@@ -0,0 +1,6 @@
+#!/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
+exit 0
diff --git a/pkg/osx/scripts/preinstall b/pkg/osx/scripts/preinstall
new file mode 100755
index 0000000..222922c
--- /dev/null
+++ b/pkg/osx/scripts/preinstall
@@ -0,0 +1,5 @@
+#!/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
+exit 0
diff --git a/pkg/osx/scripts/se.leap.bitmask-helper.plist b/pkg/osx/scripts/se.leap.bitmask-helper.plist
new file mode 100644
index 0000000..4428f13
--- /dev/null
+++ b/pkg/osx/scripts/se.leap.bitmask-helper.plist
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>StandardOutPath</key>
+ <string>bitmask-helper.log</string>
+ <key>StandardErrorPath</key>
+ <string>bitmask-helper-err.log</string>
+ <key>GroupName</key>
+ <string>daemon</string>
+ <key>KeepAlive</key>
+ <dict>
+ <key>SuccessfulExit</key>
+ <false/>
+ </dict>
+ <key>Label</key>
+ <string>se.leap.bitmask-helper</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/Applications/Bitmask.app/Contents/Resources/bitmask-helper/bitmask-helper</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>WorkingDirectory</key>
+ <string>/Applications/Bitmask.app/Contents/Resources/bitmask-helper/</string>
+ <key>SessionCreate</key>
+ <true/>
+</dict>
+</plist>