-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathinstall.sh
More file actions
89 lines (74 loc) · 1.97 KB
/
install.sh
File metadata and controls
89 lines (74 loc) · 1.97 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
#!/bin/bash
alias=r1
. /srv/http/bash/settings/addons.sh
#
# 20260409
if [[ -e /bin/firefox ]]; then
file=/lib/firefox/distribution/policies.json
[[ ! -e $file ]] && cat << EOF > $file
{
"policies": {
"DisableAppUpdate": true,
"DontCheckDefaultBrowser": true,
"OverrideFirstRunPage": "",
"SkipOnboarding": true,
"Preferences": {
"browser.startup.homepage_override.mstone": "ignore",
"browser.sessionstore.resume_from_crash": false,
"layout.css.prefers-color-scheme.content-override": 0,
"layout.css.devPixelsPerPx": "1.00"
}
}
}
EOF
file=/etc/systemd/system/localbrowser.service
! grep -q ^User $file && sed -i '/^Type/ a\User=root' $file
find /root/.config/mozilla -name user.js -delete &> /dev/null
fi
dir=/etc/systemd/system/nfs-server.service.d
if [[ -e /bin/nfsdctl && ! -e $dir ]]; then
mkdir -p $dir
cat << EOF > $dir/override.conf
[Service]
ExecStart=
ExecStopPost=
ExecStart=/bin/rpc.nfsd
ExecStop=/bin/rpc.nfsd 0
EOF
systemctl daemon-reload
systemctl try-restart nfs-server
fi
# 20260401
file=/etc/conf.d/wireless-regdom
if ! grep -q '^#W' $file; then
current=$( < $file )
curl -sL https://raw.githubusercontent.com/rern/rAudio/main/wireless-regdom -o $file
echo $current >> $file
fi
file=/etc/ssh/sshd_config
if grep -q '^PermitEmptyPasswords *yes' $file; then
sed -i -E 's/.*(PermitEmptyPasswords ).*/\1no/' $file
systemctl restart sshd
fi
#-------------------------------------------------------------------------------
installstart "$1"
rm -rf /srv/http/assets/{css,js}
getinstallzip
. $dirbash/common.sh
dirPermissions
cacheBust
[[ -e $dirsystem/color ]] && $dirbash/cmd.sh color
installfinish
# 20260413
if [[ -L $dirnas/SD ]]; then
rm $dirnas/{NVME,SATA,SD,USB} &> /dev/null
. $dirsettings/features.sh
mountBindNfs
fi
# 20260216
if [[ -e /mnt/SD ]]; then
mv -f /mnt/{SD,USB} /mnt/MPD &> /dev/null
echo -e 'NVME\nSATA\nSD\nUSB' >> /mnt/MPD/.mpdignore
sed -i 's|/mnt/USB|/mnt/MPD/USB|' /etc/udevil/udevil.conf
systemctl restart devmon@http
fi