summaryrefslogtreecommitdiff
path: root/pkg/osx/install/install-leapc.sh
blob: e47abb7c64312ab4f632ee0787e6d1872d4f52b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash

# Bitmask Installer Script.
#
# Copyright (C) 2013 LEAP Encryption Access Project
#
# This file is part of LEAP Client, as
# available from http://leap.se/. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# LEAP Client distribution. LEAP Client is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#

set -e

destlibs=/opt/local/lib
leapdir=/Applications/LEAP\ Client.app
leaplibs=${leapdir}/Contents/MacOS
tunstartup=/Library/StartupItems/tun/tun

echo "Installing Bitmask in /Applications..."
cp -r "LEAP Client.app" /Applications

echo "Copying openvpn binary..."
cp -r openvpn.leap /usr/bin 

echo "Installing tun/tap drivers..."
test -f $tunstartup && $tunstartup stop

test -d /Library/Extensions || mkdir -p /Library/Extensions
test -d /Library/StartupItems || mkdir -p /Library/StartupItems

cp -r Extensions/* /Library/Extensions
cp -r StartupItems/* /Library/StartupItems

echo "Loading tun/tap kernel extension..."

$tunstartup start

echo "Installation Finished!"