Update vpn.sh
This MR adds two updates to vpn.sh
:
Support for Linux environments (or to be precise - at least some of them)
At least on my Debian instance, openconnect
command is not available to a regular user. If not executed in root
context (e.g., by using sudo
) it's just not found by the command openconnect
call.
As we already force usage of it through sudo
, the check for command's existence should use the same approach. This will work on any platform.
Change for the OnePassword CLI tool checking was done for consistence.
Support for both production and development environments
Currently vpn.sh
is hardcoded to connect to production environment.
This MR will preserve this as a default behavior, but adds an optional argument that may be added when calling the script. With that we can chose which VPN we want to connect (which BTW is already mentioned in some of the runbooks).
Edited by Tomasz Maczukin