-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathinstall.sh
More file actions
90 lines (72 loc) · 2.15 KB
/
install.sh
File metadata and controls
90 lines (72 loc) · 2.15 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
#!/bin/bash
alias=r1
. /srv/http/bash/settings/addons.sh
# 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
# 20260212
file=/etc/conf.d/devmon
if grep -q remove $file; then
sed -i "s|usbconnect.*usbremove|usbmount|" $file
systemctl restart devmon@http
fi
file=/etc/udev/rules.d/usbstorage.rules
if [[ ! $file ]]; then
echo 'KERNEL=="sd[a-z]" \
ACTION=="add", \
RUN+="/srv/http/bash/settings/system.sh usbadd"
KERNEL=="sd[a-z]" \
ACTION=="remove", \
RUN+="/srv/http/bash/settings/system.sh usbremove"' > $file
sed -i -e 's/usbconnect/usbmount/
' -e '/^ACTION=="remove"/,$ d
' /etc/udev/rules.d/ntfs.rules
udevadm control --reload-rules
udevadm trigger
fi
file=/etc/modprobe.d/blacklist.conf
if [[ ! -e $file ]]; then
echo "\
blacklist bluetooth
blacklist bnep
blacklist btbcm
blacklist hci_uart" > $file
fi
file=/boot/config.txt
if grep -q -m1 disable-bt $file; then
sed -i '/disable-bt/ d' /boot/config.txt
touch $dirsystem/btdisable
fi
[[ ! -e /usr/bin/dtoverlay ]] && pacman -Sy --noconfirm raspberrypi-utils
if [[ ! -e /boot/kernel.img && $( spotifyd -V ) < 'spotifyd 0.4.2' ]]; then
sed -i 's/ipv6.disable=1 //' /boot/cmdline.txt
pacman -Sy --needed --noconfirm spotifyd
file=/etc/spotifyd.conf
! grep -q '^mixer = "hw"' $file && sed -i -E 's/^(mixer = ).*/\1"hw"/' $file
echo ', "spotifyd": "Spotify"' >> $dirshm/reboot
fi
#-------------------------------------------------------------------------------
installstart "$1"
rm -rf /srv/http/assets/{css,js} /srv/http/{bash,settings}
getinstallzip
. $dirbash/common.sh
dirPermissions
$dirbash/cmd.sh cachebust
[[ -e $dirsystem/color ]] && $dirbash/cmd.sh color
installfinish
# 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