Skip to content

Commit 82ade6b

Browse files
committed
fix: Use BOOT_PATH instead of hardcoded /boot
1 parent 4959c5c commit 82ade6b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/10-install-camera-streamer

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ pushd /tmp
2121
rm -rf camera-streamer-stack
2222
popd
2323

24-
# put configs on /boot on OctoPi
25-
mv /etc/camera-streamer.conf.d /boot/camera-streamer
26-
ln -s /boot/camera-streamer /etc/camera-streamer.conf.d
24+
# put configs on fat partition on OctoPi
25+
mv /etc/camera-streamer.conf.d $BOOT_PATH/camera-streamer
26+
ln -s $BOOT_PATH/camera-streamer /etc/camera-streamer.conf.d
2727

2828
# only run stack if mjpeg is selected as streamer
2929
for unit in camera-streamer camera-streamer-usb@ camera-streamer-libcamera; do
@@ -32,7 +32,7 @@ for unit in camera-streamer camera-streamer-usb@ camera-streamer-libcamera; do
3232
done
3333

3434
# enable camera auto-detection
35-
sed -i 's/^camera_auto_detect=0/camera_auto_detect=1/' /boot/config.txt
35+
sed -i 's/^camera_auto_detect=0/camera_auto_detect=1/' $BOOT_PATH/config.txt
3636

3737
# Only enable the camera-streamer service, it will start the others as configured
3838
systemctl enable camera-streamer.service
@@ -42,7 +42,7 @@ cp /files/503-no-webcam.http /etc/haproxy/errors/503-no-webcam.http
4242

4343
### --- clean up the old stuff ------------------------------------------------
4444

45-
cat > /boot/octopi.txt <<EOF
45+
cat > $BOOT_PATH/octopi.txt <<EOF
4646
### IMPORTANT: Looking for the camera settings? Those are now located
4747
### in the camera-streamer directory! libcamera.conf to configure the Raspberry Pi
4848
### camera and usb-default.conf to configure USB cameras. Read more about it here:
@@ -85,4 +85,4 @@ rm /etc/logrotate.d/webcamd
8585
rm /etc/systemd/system/webcamd.service
8686
rm /root/bin/webcamd
8787
rm -rf /opt/mjpg-streamer
88-
rm /home/pi/mjpg-streamer
88+
[ -f "/home/pi/mjpg-streamer" ] && rm /home/pi/mjpg-streamer

0 commit comments

Comments
 (0)