-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmullvad.sh
executable file
·82 lines (61 loc) · 1.72 KB
/
mullvad.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
clear
echo "
___ ____ _ _ ____ _ _ _ ____ ___ ____ _ _ ____ ____
/ |___ | | [__ | |\ | [__ | |__| | | |___ |__/
/__ |___ |__| ___] | | \| ___] | | | |___ |___ |___ | \
"
#This is a script to help install Mullvad VPN for the Raspberry pi
######################################################################
#Functions List
noanswer () { echo "Skipping..." ; }
update () { yes | sudo apt-get update; }
wireguard () { yes | sudo apt-get install curl jq openresolv wireguard; }
config () { yes | curl -LO https://mullvad.net/media/files/mullvad-wg.sh && chmod +x ./mullvad-wg.sh && ./mullvad-wg.sh; }
openresolv () { yes | sudo apt install openresolv; }
######################################################################
#Install wireguard
echo "Would you like to install Wireguard (Required)? (y/n/e)"
echo " "
echo "y=yes | n=no | e=exit-installer"
read -n1 yesorno
if [ "$yesorno" = y ]; then
update
openresolv
wireguard
echo " "
echo "Installation Successful."
echo " "
elif [ "$yesorno" = n ]; then
echo " "
echo "Skipping..."
echo " "
elif [ "$yesorno" = e ]; then
echo " "
echo "Goodbye!"
exit 1
else
echo "Not a valid answer. Exiting..."
fi
#Configure Mullvad
echo "Would you like to install Mullvad (Required)? (y/n)"
read -n1 yesorno
if [ "$yesorno" = y ]; then
yes | sudo apt-get install jq
config
echo " "
echo "Setup Successful."
echo " "
elif [ "$yesorno" = n ]; then
echo " "
echo "Skipping..."
echo " "
elif [ "$yesorno" = e ]; then
echo " "
echo "Goodbye!"
exit 1
else
echo " "
echo "Not a valid answer. Exiting..."
fi
echo "Initial Wireguard and Mullvad Setup Complete. Goodbye!"