forked from BrowserBox/BrowserBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_machine.sh
executable file
·51 lines (44 loc) · 1.49 KB
/
setup_machine.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
#!/bin/bash
if command -v dnf; then
sudo $APT install -y wget curl jq unzip bc psmisc psutils tuned
else
sudo $APT install -y apt-utils wget curl jq unzip bc psmisc psutils tuned
fi
source ~/.nvm/nvm.sh
cd src/zombie-lord
sudo -E ./video.deps
sudo -E ./audio.deps
sudo -E ./deb.deps
sudo -E ./font.deps
sudo -E ./pptr.deps
sudo -E ./dlchrome.sh
if which google-chrome-stable; then
echo "chrome installed"
else
echo "chrome failed to install. you need to run setup again"
exit 1
fi
cd ../..
sudo $APT install -y libvips libjpeg-dev
./scripts/install_bundle_deps.sh
./scripts/install_global_bundle_deps.sh
sudo ./scripts/install_webp.sh
bash ./scripts/audio_setup.sh
echo Installing audio config to /etc/pulse/
sudo cp -r src/services/instance/parec-server/pulse/* /etc/pulse/
mkdir -p ~/.config/pulse/
cp -r src/services/instance/parec-server/pulse/* ~/.config/pulse/
sudo loginctl enable-linger
sudo mkdir -p /usr/local/lib/systemd/logind.conf.d
sudo echo "KillUserProcesses=no" > /usr/local/lib/systemd/logind.conf.d/nokill.conf
sudo groupadd browsers
sudo groupadd scripters
# Edit the sudoers file to allow members of the "renice" group to run the "renice" command
if ! sudo grep -q "%renice ALL=(ALL) NOPASSWD:" /etc/sudoers;
then
sudo groupadd renice >&2
echo "%renice ALL=NOPASSWD: /usr/bin/renice, /usr/bin/loginctl, /usr/bin/id" | sudo tee -a /etc/sudoers >&2
fi
sudo ufw disable
which pm2 || npm i -g pm2@latest || sudo npm i -g pm2@latest
sudo setcap 'cap_net_bind_service=+ep' $(which node)