jotyGill / openpyn-nordvpn

Easily connect to and switch between, OpenVPN servers hosted by NordVPN on Linux (+patch leakes)
GNU General Public License v3.0
628 stars 114 forks source link

systemd.py: Fallback for openpyn_path when not in PATH #290

Open AbdealiLoKo opened 2 years ago

AbdealiLoKo commented 2 years ago

Earlier we were assuming that openpyn_path was always found in the PATH and we got that from shutil.which() But if it is not found, we assume that the command being run right now is the path to the executable.

Handles cases like: sudo /bin/openpyn --init where the user explicitly gives an abspath

Resolves: https://github.com/jotyGill/openpyn-nordvpn/issues/289