-
Notifications
You must be signed in to change notification settings - Fork 0
/
initialize
executable file
·39 lines (21 loc) · 1010 Bytes
/
initialize
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
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
clear
# Define colors
# Reset
colorOff='\033[0m' # Text Reset
# Regular Colors
red='\033[0;31m' # red
green='\033[0;32m' # green
echo -e "$green Downloading vpn profiles... $colorOff"
pathToDownload="$HOME/OpenVPN"
repoAddress="https://raw.githubusercontent.com/virtualdemon/chauffeur-vpn/master"
files=(US.ovpn DE.ovpn start.exp)
mkdir -p $pathToDownload
for file in ${files[@]};do
echo -e "$green Adding $file $colorOff"
which curl 2> /dev/null && curl -s -o $pathToDownload/$file $repoAddress/$file || which wget && wget $repoAddress/$file -O $pathToDownload/$file
done
chmod +x "$pathToDownload/start.exp"
echo -e "$green Installing needed packages $colorOff"
which apt 2> /dev/null && sudo apt install -y openvpn expect || which pacman 2> /dev/null && sudo pacman -S --noconfirm openvpn expect || which yum 2> /dev/null && sudo yum install -y openvpn expect
echo -e "$green Now you should run: $red sudo $HOME/OpenVPN/start.exp $colorOff"