-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpritunl
40 lines (31 loc) · 1013 Bytes
/
pritunl
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
#!/bin/bash
apt-get update
apt-get -y install curl apt-transport-https
sudo tee /etc/apt/sources.list.d/pritunl.list << EOF
deb [ signed-by=/usr/share/keyrings/pritunl.gpg ] https://repo.pritunl.com/stable/apt bookworm main
EOF
sudo apt --assume-yes install gnupg
curl -fsSL https://raw.githubusercontent.com/pritunl/pgp/master/pritunl_repo_pub.asc | sudo gpg -o /usr/share/keyrings/pritunl.gpg --dearmor --yes
sudo apt update
mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 666 /dev/net/tun
apt-get -y install mongodb-org pritunl
systemctl enable mongod
systemctl enable pritunl
cat >> /etc/rc.local <<EOF
mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 666 /dev/net/tun
/usr/bin/mongod --config /etc/mongod.conf --fork
/usr/bin/pritunl start -d -q
EOF
systemctl start mongod
systemctl start pritunl
/usr/bin/mongod --config /etc/mongod.conf --fork
/usr/bin/pritunl start -d -q
cat <<EOF
Installation of Pritunl OpenVPN finished.
To configure your vpn server go to:
https://$(hostname)
EOF