-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimpleminingvpn.sh
More file actions
103 lines (63 loc) · 1.99 KB
/
simpleminingvpn.sh
File metadata and controls
103 lines (63 loc) · 1.99 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/bash
echo Easily integrate OpenVPN to simplemining made easy by Ari
echo Updating...
apt update
echo Installing requirements
apt install apt-transport-https
wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
apt-key add openvpn-repo-pkg-key.pub
PS3='Choose Your OS: '
versions=("debian11" "ubuntu18" "ubuntu21" "Quit")
ubuntu=18
select ver in "${versions[@]}"; do
case $ver in
"debian11")
echo "You chose Debian 11"
# optionally call a function or run some code here
ubuntu=bullseye
break
;;
"ubuntu18")
echo "you chose Ubuntu 18.04"
# optionally call a function or run some code here
ubuntu=bionic
break
;;
"ubuntu21")
echo "you chose Ubuntu 21.04"
# optionally call a function or run some code here
ubuntu=hirsute
break
;;
"Quit")
echo "User requested exit"
exit
;;
*) echo "invalid option $REPLY";;
esac
done
wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-$ubuntu.list
apt update
apt install openvpn
apt install openvpn-systemd-resolved
echo Done installing requirements...
echo "Creating directory /etc/openvpnservers"
mkdir /etc/openvpnservers/
echo Done
echo "Creating NordVPN login.conf if you want to use it"
cat > /etc/openvpnservers/login.conf << EOF
Username here
Password here
EOF
echo Done!
echo Insert link to ovpn file!
read link1
wget ${link1} -O /etc/openvpnservers/Server.ovpn
echo Getting service file from github...
wget https://raw.githubusercontent.com/AriBerisha/Mining-OpenVPN/main/simpleminingvpn.txt -P /etc/systemd/system/
echo Done!
echo Creating Service...
mv /etc/systemd/system/simpleminingvpn.txt /etc/systemd/system/simpleminingvpn.service
systemctl daemon-reload
systemctl enable simpleminingvpn.service
echo Done!