forked from rern/rAudio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
69 lines (50 loc) · 1.57 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
alias=r1
dirbash=/srv/http/bash
dirshm=/srv/http/data/shm
dirsystem=/srv/http/data/system
. $dirbash/addons.sh
# 20220107
grep -q /srv/http/data/mpd/mpdstate /etc/mpd.conf && sed -i 's|^\(state_file.* "\).*|\1/var/lib/mpd/mpdstate"|' /etc/mpd.conf
# 20121224
if [[ -e /etc/default/snapserver ]]; then
touch $dirsystem/usbautoupdate
rm /etc/default/snapserver
fi
# 20211222
rm -f /etc/systemd/system/rotarymute.service
[[ ! -e /usr/bin/evtest ]] && pacman -Sy --noconfirm evtest
#20211210
revision=$( awk '/Revision/ {print $NF}' /proc/cpuinfo )
if [[ ${revision: -3:2} == 12 ]]; then
grep -q dtparam=krnbt=on /boot/config.txt || echo dtparam=krnbt=on >> /boot/config.txt
fi
file=/etc/samba/smb.conf
if [[ -e $file ]] && ! grep -q 'force user' $file; then
sed -i '/map to guest/ a\
force user = mpd
' $file
systemctl try-restart smb
fi
file=/srv/http/data/mpd/counts
grep -q playlists $file || sed -i '/genre/ a\
"playlists": '$( ls -1 $dirdata/playlists | wc -l )',
' $file
# 20211203
if [[ -e /srv/http/data/embedded ]]; then
rm -rf /srv/http/data/embedded
mkdir -p $dirshm/{airplay,embedded,spotify,local,online,sampling,webradio}
sed -i '/chromium/ d' /etc/pacman.conf
files=( $( ls /etc/systemd/network/eth* ) )
for file in "${files[@]}"; do
grep -q RequiredForOnline=no $file || echo "
[Link]
RequiredForOnline=no" >> $file
done
fi
installstart "$1"
getinstallzip
[[ $( uname -m ) == armv6l ]] && sed -i -e 's|/usr/bin/taskset -c 3 ||' -e '/upnpnice/ d' /etc/systemd/system/upmpdcli.service
systemctl daemon-reload
$dirbash/mpd-conf.sh
installfinish