-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
install.sh
49 lines (39 loc) · 1.47 KB
/
install.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
### If using a Raspberry Pi, and if having issues updating
sudo chmod 777 /etc/resolv.conf
sudo echo "nameserver 1.1.1.1" >> /etc/resolv.conf
sudo chmod 644 /etc/resolv.conf
sudo chattr -V +i /etc/resolv.conf ### lock access
sudo systemctl restart systemd-resolved.service
export GIT_SSL_NO_VERIFY=1
### Update
sudo apt-get update
sudo apt-get upgrade -y
### Install dependencies
sudo apt-get install git -y
sudo apt-get install nodejs -y
sudo apt-get install npm -y
sudo apt-get install vim -y
sudo apt-get install net-tools -y
### Install vdo.ninja
git clone https://github.com/steveseguin/vdo.ninja
## configure vdo.ninja for local hss server
sed -i 's/\/\/ session\.customWSS = true;/session\.wss = "wss:\/\/"+window\.location\.hostname+":8443";session\.customWSS = true;/' ./vdo.ninja/index.html
### Install websocket server
git clone https://github.com/steveseguin/offline_deployment
mv offline_deployment webserver
cd webserver
npm install
## Lets create our self-signed certs
openssl req -nodes -new -x509 -keyout key.pem -out cert.pem
## Just press enter to skip past the questions at the end of the process
## Make it available to the website, so you can download it and install it
cp cert.pem ../vdo.ninja/cert.pem
## create a service and start the server
sudo cp vdoninja.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable vdoninja
sudo systemctl restart vdoninja
## or start our server directly ..
# sudo nodejs server.js
## show IP addresses
ifconfig