summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-03-05 17:55:29 +0100
committerKali Kaneko <kali@leap.se>2018-03-22 17:47:07 +0100
commit9ee4859558b868f01012c39dd98bf292d64e09f0 (patch)
treef4a96f62fb5bdd5da0b343ac0912866effc2184c /src/leap/bitmask/vpn
parent176035bc57d22f2e7e879331b84f8d8afa232e0d (diff)
[pkg] minor adjustments for riseupvpn osx bundle
- duplicate the scripts folder for riseupvpn - fix renaming of helper - set openvpn path for riseupvpn
Diffstat (limited to 'src/leap/bitmask/vpn')
-rw-r--r--src/leap/bitmask/vpn/launchers/darwin.py24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/leap/bitmask/vpn/launchers/darwin.py b/src/leap/bitmask/vpn/launchers/darwin.py
index 03393da2..d959b159 100644
--- a/src/leap/bitmask/vpn/launchers/darwin.py
+++ b/src/leap/bitmask/vpn/launchers/darwin.py
@@ -73,29 +73,23 @@ class DarwinVPNLauncher(VPNLauncher):
# Hardcode the installation path for OSX for security, openvpn is
# run as root
- INSTALL_PATH = "/Applications/Bitmask.app/"
- OPENVPN_BIN = 'openvpn.leap'
- OPENVPN_PATH = "%s/Contents/Resources/openvpn" % (INSTALL_PATH,)
- try:
- INSTALL_PATH_ESCAPED = os.path.realpath(os.getcwd() + "/../../")
- except OSError as exc:
- # this might happen if os.getcwd() was deleted under our feet. We do
- # not want to raise the Exception at import time.
- logger.error('Error while setting openvpn paths: %r' % exc)
- INSTALL_PATH_ESCAPED = "/Applications/Bitmask.app/"
- OPENVPN_PATH_ESCAPED = "%s/Contents/Resources/openvpn" % (
- INSTALL_PATH_ESCAPED,)
+ if os.path.isdir('/Applications/RiseupVPN.app'):
+ INSTALL_PATH = '/Applications/RiseupVPN.app'
+ else:
+ INSTALL_PATH = '/Applications/Bitmask.app'
- OTHER_FILES = []
+ OPENVPN_BIN = 'openvpn.leap'
+ OPENVPN_PATH = "%s/Contents/Resources/" % (INSTALL_PATH,)
- _openvpn_bin_path = "%s/Contents/Resources/%s" % (
- INSTALL_PATH, OPENVPN_BIN)
+ _openvpn_bin_path = os.path.join(OPENVPN_PATH, OPENVPN_BIN)
if os.path.isfile(_openvpn_bin_path):
OPENVPN_BIN_PATH = _openvpn_bin_path
else:
# let's try with the homebrew path
OPENVPN_BIN_PATH = '/usr/local/sbin/openvpn'
+ OTHER_FILES = []
+
def kill_previous_openvpn():
pass