diff options
author | kali <kali@leap.se> | 2017-08-03 21:01:34 -0700 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-08-14 18:09:15 -0400 |
commit | 201a751f0a0da9fa0427d683cb56725a40a00d89 (patch) | |
tree | 3c148c489cceb71ccbb9c0a8d37a331506001b67 /pkg/osx/scripts | |
parent | 9c74ffb925325de98e8dd73acdf1602dd40bfcc0 (diff) |
[pkg] automate flat package
Diffstat (limited to 'pkg/osx/scripts')
-rwxr-xr-x | pkg/osx/scripts/postinstall | 6 | ||||
-rwxr-xr-x | pkg/osx/scripts/preinstall | 5 | ||||
-rw-r--r-- | pkg/osx/scripts/se.leap.bitmask-helper.plist | 29 |
3 files changed, 40 insertions, 0 deletions
diff --git a/pkg/osx/scripts/postinstall b/pkg/osx/scripts/postinstall new file mode 100755 index 00000000..9c2176b2 --- /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 00000000..222922cf --- /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 00000000..4428f131 --- /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> |