Skip to content

Commit

Permalink
Updated new anyconnect path
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Otoupal committed Feb 16, 2024
1 parent bbde431 commit 342c69f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions dvpn/vpns/anyconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class AnyConnectCLI(VpnCli):
)

cli_path_osx = Path("/opt/cisco/anyconnect/bin/vpn")
cli_path_osx_2 = Path("/opt/cisco/secureclient/bin/vpn")

def get_state(self, name: str) -> str:
stdout = subprocess.check_output([self.cli_path, "state", name]).decode()
Expand Down
5 changes: 4 additions & 1 deletion dvpn/vpns/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def get_state(self, name: str) -> str:
def get_default_cli_path(cls):
if os.name == "nt":
return str(cls.cli_path_win)
return str(cls.cli_path_osx)
if cls.cli_path_osx.exists():
return str(cls.cli_path_osx)
else:
return str(cls.cli_path_osx_2)

@abc.abstractmethod
def get_connected_vpn(self):
Expand Down
2 changes: 0 additions & 2 deletions dvpn/vpns/tunnelblick.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import logging
import os
import subprocess
import sys
from pathlib import Path
from time import sleep

from dvpn.vpns.base import VpnCli
Expand Down

0 comments on commit 342c69f

Please sign in to comment.