-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate-vpn.sh
More file actions
28 lines (22 loc) · 951 Bytes
/
create-vpn.sh
File metadata and controls
28 lines (22 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Shell script to create and configure the Python Virtual Environment
# that will be used to run the OpenConnect Python script.
# Create the python virtual environment:
python3 -m venv ~/OpenConnect-VPN/venv
# Use the built-in shell "source" command to Activate python VM:
# Activation scripts are available for shells:
# BASH, ZSH, CSH, TCSH and FISH
CURRENTSHELL=$(echo $SHELL | awk -F "/" '{print $NF}')
if [ "$CURRENTSHELL" = "bash" ] || [ "$CURRENTSHELL" = "zsh" ]; then
source ~/OpenConnect-VPN/venv/bin/activate
elif [ "$CURRENTSHELL" = "fish" ]; then
source ~/OpenConnect-VPN/venv/bin/activate.fish
elif [ "$CURRENTSHELL" = "tcsh" ] || [ "$CURRENTSHELL" = "csh" ]; then
source ~/OpenConnect-VPN/venv/bin/activate.csh
else
echo "ERROR: Unknown or unsupported shell."
exit 1
fi
# Install python modules into VM:
pip install selenium webdriver-manager geckodriver-autoinstaller
# Exit VM:
deactivate