Skip to content

Commit 93c25ba

Browse files
install: eliminate some errors on bookworm (#6)
1 parent 55c2131 commit 93c25ba

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

scripts/install.sh

+16-7
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,23 @@ function fail {
88
echo "### RPI-KVM Install ##############"
99
echo "--- RPI-KVM Dependency Install ---"
1010
echo "Install required basic packages via apt-get"
11-
sudo apt-get install git tmux python python3 python-dev python3-dev python3-pip -y
11+
sudo apt update
12+
sudo apt-get install git tmux python-is-python3 python3 python3-dev python3-pip -y
1213
echo "Install required bluetooth packages via apt-get"
1314
sudo apt-get install bluez bluez-tools bluez-firmware python3-bluez -y
14-
echo "Install required python packages via pip3"
15-
sudo pip3 install evdev dbus-next aiohttp RPi.GPIO
1615
echo "Install required python packages via apt-get"
17-
sudo apt-get install python3-pyudev python3-evdev python3-dbus python3-numpy python3-gi -y
18-
echo "Install dev tools"
19-
curl -sSL https://deb.nodesource.com/setup_16.x | sudo bash -
20-
sudo apt install -y nodejs
16+
sudo apt-get install python3-pyudev python3-evdev python3-dbus python3-dbus-next python3-aiohttp python3-rpi.gpio python3-numpy python3-gi -y
17+
echo "Install nodejs"
18+
sudo apt-get update
19+
sudo apt-get install -y ca-certificates curl gnupg
20+
sudo mkdir -p /etc/apt/keyrings
21+
# --yes allows overwriting if re-running the script (to repair a broken install or get new fixes)
22+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor --yes -o /etc/apt/keyrings/nodesource.gpg
23+
# This can be changed to a newer supported version once tested
24+
NODE_MAJOR=16
25+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
26+
sudo apt-get update
27+
sudo apt-get install nodejs -y
2128
echo "--- Dependency Install Done ------"
2229

2330
echo "--- RPI-KVM Configuration Step ---"
@@ -54,6 +61,8 @@ sudo sed -i "s|BLUETOOTH_DAEMON_PATH|${bluetoothd_path}|" /lib/systemd/system/bl
5461

5562
echo "Copy RPI-KVM service config"
5663
sudo cp ./conf/rpi-kvm.service /lib/systemd/system/rpi-kvm.service
64+
echo "Replace legacy pi user with current user if necessary"
65+
sudo sed -i'' -e "s|/pi/|/${SUDO_USER}/|g" /lib/systemd/system/rpi-kvm.service
5766
sudo systemctl daemon-reload
5867
echo "Restart bluetooth service with the new config"
5968
sudo systemctl restart bluetooth

0 commit comments

Comments
 (0)