diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2017-06-13 19:49:31 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2017-06-13 19:49:31 +0200 |
commit | c32850c8e4fa5bedce319e3aeb6d60716dfcdc36 (patch) | |
tree | f68c754e749de5768c1f99cd82870f5a1dd0a303 /src/leap/bitmask/vpn | |
parent | f54ab060a65cf066250cfa301e1cca02e3e81fc7 (diff) |
[bug] pick the openvpn binary in the helper too
Diffstat (limited to 'src/leap/bitmask/vpn')
-rwxr-xr-x | src/leap/bitmask/vpn/helpers/osx/bitmask-helper | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/leap/bitmask/vpn/helpers/osx/bitmask-helper b/src/leap/bitmask/vpn/helpers/osx/bitmask-helper index 2990219f..eb22766d 100755 --- a/src/leap/bitmask/vpn/helpers/osx/bitmask-helper +++ b/src/leap/bitmask/vpn/helpers/osx/bitmask-helper @@ -68,7 +68,6 @@ OPENVPN_GROUP = 'nogroup' LEAPOPENVPN = 'LEAPOPENVPN' APP_PATH = '/Applications/Bitmask.app/' RESOURCES_PATH = APP_PATH + 'Contents/Resources/' -OPENVPN_LEAP_BIN = RESOURCES_PATH + 'openvpn.leap' FIXED_FLAGS = [ "--setenv", "LEAPOPENVPN", "1", @@ -216,8 +215,6 @@ def handle_command(sock): finally: sock.close() - - # # OPENVPN # @@ -243,17 +240,20 @@ def openvpn_start(*args): '--down', RESOURCES_PATH + 'client.down.sh'] opts += ["--dev", "tun"] binary = [RESOURCES_PATH + 'openvpn.leap'] + if not os.path.isfile(binary[0]): + binary = ['/usr/local/sbin/openvpn'] cmd = binary + opts - #syslog.syslog(syslog.LOG_WARNING, 'LAUNCHING VPN: ' + ' '.join(cmd)) + + # syslog.syslog(syslog.LOG_WARNING, 'LAUNCHING VPN: ' + ' '.join(cmd)) # TODO sanitize options global openvpn_proc openvpn_proc = subprocess.Popen(cmd, shell=False, bufsize=-1) - #try: + # try: # result = subprocess.check_output(cmd, shell=False, stderr=subprocess.STDOUT) - #except Exception as exc: + # except Exception as exc: # syslog.syslog(syslog.LOG_WARNING, exc.output) - #syslog.syslog(syslog.LOG_WARNING, "OpenVPN PID: %s" % str(openvpn_proc.pid)) + # syslog.syslog(syslog.LOG_WARNING, "OpenVPN PID: %s" % str(openvpn_proc.pid)) def openvpn_stop(sig='TERM'): @@ -264,7 +264,7 @@ def openvpn_stop(sig='TERM'): :type args: list """ global openvpn_proc - + if openvpn_proc: syslog.syslog(syslog.LOG_WARNING, "OVPN PROC: %s" % str(openvpn_proc.pid)) |