@@ -26,20 +26,17 @@ sed -i 's/^camera_auto_detect=0/camera_auto_detect=1/' /boot/config.txt
2626# install default configs
2727mkdir -p /boot/camera-streamer
2828cp /files/camera-streamer/libcamera.conf /boot/camera-streamer/libcamera.conf
29- cp /files/camera-streamer/usb.conf /boot/camera-streamer/usb.conf
29+ cp /files/camera-streamer/usb-default .conf /boot/camera-streamer/usb-default .conf
3030
31- # install libcamera service
32- cp /files/camera-streamer/camera-streamer-libcamera.service /etc/systemd/system/camera-streamer-libcamera.service
33- systemctl enable camera-streamer-libcamera.service
34-
35- # install USB camera service
31+ # install services
3632cp /files/camera-streamer/camera-streamer-control /root/bin/camera-streamer-control
3733chmod +x /root/bin/camera-streamer-control
3834
39- cp /files/camera-streamer/camera-streamer-usb@.service /etc/systemd/system/camera-streamer-usb@.service
40- cp /files/camera-streamer/camera-streamer-usb@.path /etc/systemd/system/camera-streamer-usb@.path
4135cp /files/camera-streamer/camera-streamer.service /etc/systemd/system/camera-streamer.service
36+ cp /files/camera-streamer/camera-streamer-libcamera.service /etc/systemd/system/camera-streamer-libcamera.service
37+ cp /files/camera-streamer/camera-streamer-usb@.service /etc/systemd/system/camera-streamer-usb@.service
4238
39+ # Only enable the camera-streamer service, it will start the others as configured
4340systemctl enable camera-streamer.service
4441
4542# install helper scripts
@@ -50,7 +47,48 @@ chmod +x /root/bin/add-usb-camera
5047chmod +x /root/bin/remove-usb-camera
5148chmod +x /root/bin/list-usb-cameras
5249
53- # clean up the old crap
50+ # clean up the old stuff
51+ cat > /boot/octopi.txt <<EOF
52+ ### IMPORTANT: Looking for the camera settings? Those are now located
53+ ### in the camera-streamer directory! libcamera.conf to configure the Raspberry Pi
54+ ### camera and usb-default.conf to configure USB cameras. Read more about it here:
55+ ### https://faq.octoprint.org/camera-streamer-config
56+
57+ ### Windows users: To edit this file use Notepad++, VSCode or SublimeText.
58+ ### Do not use Notepad or WordPad.
59+
60+ ### MacOSX users: If you use Textedit to edit this file make sure to use
61+ ### "plain text format" and "disable smart quotes" in "Textedit > Preferences"
62+
63+ # Configuration of network monitoring
64+ #
65+ # This enables network monitoring for wifi connections with a simple ping test.
66+ # If connection terminates by variable reasons system tries to restart the wifi connection to reestablish a connection.
67+ # The connection test is done every minute.
68+ # By default it is disabled (0 = off / 1 = on)
69+ # destination_host can be an ip address or a hostname (for hostname ensure dns resosultion is working correctly)
70+
71+ enable_network_monitor=0
72+
73+ # Be sure to change this to match your network!
74+ destination_host=192.168.1.1
75+
76+ ### EXPERIMENTAL
77+ # Support for different streamer types.
78+ #
79+ # Available options:
80+ # mjpeg [default] - camera-streamer
81+ # hls - FFMPEG HLS streamer
82+ #camera_streamer=mjpeg
83+ EOF
84+
85+ sed -i 's/webcamd\.service/camera-streamer.service/' /etc/systemd/system/streamer_select.service
86+ sed -i 's/webcamd\.service/camera-streamer.service/' /root/bin/streamer_select
87+
5488systemctl disable webcamd
89+
90+ rm /etc/logrotate.d/webcamd
91+ rm /etc/systemd/system/webcamd.service
5592rm /root/bin/webcamd
5693rm -rf /opt/mjpg-streamer
94+ rm /home/pi/mjpg-streamer
0 commit comments