64 |
The OctoPrint server is currently not running
65 |
66 |
67 | If you just started up your Raspberry Pi, please wait a couple of seconds, then
68 | try to refresh this page.
69 |
70 |
71 |
72 | If the issue persists, please log into your Raspberry Pi via SSH and check the following:
73 |
74 |
75 |
96 |
97 |
98 | If all that doesn't help to trouble shoot the issue, you can seek
99 | support on the OctoPrint Community Forum.
100 | Please provide your OctoPi and OctoPrint versions as well as your octoprint.log
101 | and explain what you already tried and observed as detailed as possible.
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/haproxy/errors/503-no-webcam-hls.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 503 Service Unavailable
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
64 |
The webcam server is currently not running
65 |
66 |
67 | If you do not have a camera attached, this is normal and can be safely ignored.
68 |
69 |
70 |
71 | Otherwise, if you just started up your Raspberry Pi or just plugged in your camera,
72 | please wait a couple of seconds.
73 |
74 |
75 |
76 | If the issue persists, please check the following:
77 |
78 |
79 |
101 |
102 |
103 | If all that doesn't help to trouble shoot the issue, you can seek
104 | support on the OctoPrint Community Forum.
105 | Please provide your camera model, lsusb
output and /var/log/webcamd.log
and explain what you
106 | already tried and observed as detailed as possible.
107 |
108 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/haproxy/haproxy.1.x.cfg:
--------------------------------------------------------------------------------
1 | global
2 | maxconn 4096
3 | user haproxy
4 | group haproxy
5 | log /dev/log local1 debug
6 | tune.ssl.default-dh-param 2048
7 |
8 | defaults
9 | log global
10 | mode http
11 | compression algo gzip
12 | option httplog
13 | option dontlognull
14 | retries 3
15 | option redispatch
16 | option http-server-close
17 | option forwardfor
18 | maxconn 2000
19 | timeout connect 5s
20 | timeout client 15min
21 | timeout server 15min
22 |
23 | frontend public
24 | bind :::80 v4v6
25 | bind :::443 v4v6 ssl crt /etc/ssl/snakeoil.pem
26 | option forwardfor except 127.0.0.1
27 | use_backend webcam if { path_beg /webcam/ }
28 | use_backend webcam_hls if { path_beg /hls/ }
29 | use_backend webcam_hls if { path_beg /jpeg/ }
30 | default_backend octoprint
31 |
32 | backend octoprint
33 | acl needs_scheme req.hdr_cnt(X-Scheme) eq 0
34 |
35 | reqrep ^([^\ :]*)\ /(.*) \1\ /\2
36 | reqadd X-Scheme:\ https if needs_scheme { ssl_fc }
37 | reqadd X-Scheme:\ http if needs_scheme !{ ssl_fc }
38 | option forwardfor
39 | server octoprint1 127.0.0.1:5000
40 | errorfile 503 /etc/haproxy/errors/503-no-octoprint.http
41 |
42 | backend webcam
43 | reqrep ^([^\ :]*)\ /webcam/(.*) \1\ /\2
44 | server webcam1 127.0.0.1:8080
45 | errorfile 503 /etc/haproxy/errors/503-no-webcam.http
46 |
47 | backend webcam_hls
48 | server webcam_hls_1 127.0.0.1:28126
49 | errorfile 503 /etc/haproxy/errors/503-no-webcam-hls.http
50 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/haproxy/haproxy.2.x.cfg:
--------------------------------------------------------------------------------
1 | global
2 | maxconn 4096
3 | user haproxy
4 | group haproxy
5 | log /dev/log local1 debug
6 | tune.ssl.default-dh-param 2048
7 |
8 | defaults
9 | log global
10 | mode http
11 | compression algo gzip
12 | option httplog
13 | option dontlognull
14 | retries 3
15 | option redispatch
16 | option http-server-close
17 | option forwardfor
18 | maxconn 2000
19 | timeout connect 5s
20 | timeout client 15m
21 | timeout server 15m
22 |
23 | frontend public
24 | bind :::80 v4v6
25 | bind :::443 v4v6 ssl crt /etc/ssl/snakeoil.pem
26 | option forwardfor except 127.0.0.1
27 | use_backend webcam if { path_beg /webcam/ }
28 | use_backend webcam_hls if { path_beg /hls/ }
29 | use_backend webcam_hls if { path_beg /jpeg/ }
30 | default_backend octoprint
31 |
32 | backend octoprint
33 | acl needs_scheme req.hdr_cnt(X-Scheme) eq 0
34 |
35 | http-request replace-path ^([^\ :]*)\ /(.*) \1\ /\2
36 | http-request add-header X-Scheme https if needs_scheme { ssl_fc }
37 | http-request add-header X-Scheme http if needs_scheme !{ ssl_fc }
38 | option forwardfor
39 | server octoprint1 127.0.0.1:5000
40 | errorfile 503 /etc/haproxy/errors/503-no-octoprint.http
41 |
42 | backend webcam
43 | http-request replace-path /webcam/(.*) /\1
44 | server webcam1 127.0.0.1:8080
45 | errorfile 503 /etc/haproxy/errors/503-no-webcam.http
46 |
47 | backend webcam_hls
48 | server webcam_hls_1 127.0.0.1:28126
49 | errorfile 503 /etc/haproxy/errors/503-no-webcam-hls.http
50 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/init.d/change_hostname:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ### BEGIN INIT INFO
3 | # Provides: change_hostname
4 | # Required-Start: $local_fs
5 | # Required-Stop:
6 | # Default-Start: 3
7 | # Default-Stop:
8 | # Short-Description: Change pi's hostname via /boot/octopi-hostname.txt
9 | # Description:
10 | ### END INIT INFO
11 |
12 | . /lib/lsb/init-functions
13 |
14 | BOOT_FOLDER=/boot/firmware
15 | # Fallback for older images
16 | if [ ! -f "${CONFIG_FILE}" ] && [ -f "/boot/octopi.txt" ]; then
17 | BOOT_FOLDER=/boot
18 | fi
19 |
20 | do_start () {
21 | text_file="${BOOT_FOLDER}/octopi-hostname.txt"
22 | if [ ! -f "$text_file" ]
23 | then
24 | exit 0
25 | fi
26 |
27 | old_hostname=`hostname`
28 | new_hostname=`head -n1 "$text_file" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr -d '\n'`
29 |
30 | if [ ! -n "$new_hostname" ]
31 | then
32 | log_failure_msg "No new host name provided, refusing to change to empty host name"
33 | exit 1
34 | fi
35 |
36 | # make sure we do have a valid hostname here (see RFC 952 and 1123, a-zA-Z0-9 only)
37 | sanitized_hostname=`echo "$new_hostname" | tr -cd '[[:alnum:]]-'`
38 | if [ "$new_hostname" = "$sanitized_hostname" ]
39 | then
40 | rm "$text_file"
41 | echo "$new_hostname" > /etc/hostname
42 | sed -i -e "s@$old_hostname@$new_hostname@g" /etc/hosts
43 |
44 | log_success_msg "Change of host name prepared, rebooting to apply..."
45 | /sbin/reboot
46 | else
47 | log_failure_msg "Hostname $new_hostname contains invalid characters (only a-zA-Z0-9 are allowed), refusing to change"
48 | fi
49 | }
50 |
51 | case "$1" in
52 | start|"")
53 | do_start
54 | ;;
55 | restart|reload|force-reload)
56 | echo "Error: argument '$1' not supported" >&2
57 | exit 3
58 | ;;
59 | stop)
60 | # No-op
61 | ;;
62 | *)
63 | echo "Usage: change_hostname [start|stop]" >&2
64 | exit 3
65 | ;;
66 | esac
67 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/init.d/change_password:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ### BEGIN INIT INFO
3 | # Provides: change_password
4 | # Required-Start: $local_fs
5 | # Required-Stop:
6 | # Default-Start: 3
7 | # Default-Stop:
8 | # Short-Description: Change pi's password via /boot/octopi-password.txt
9 | # Description:
10 | ### END INIT INFO
11 |
12 | . /lib/lsb/init-functions
13 |
14 | BOOT_FOLDER=/boot/firmware
15 | # Fallback for older images
16 | if [ ! -f "${CONFIG_FILE}" ] && [ -f "/boot/octopi.txt" ]; then
17 | BOOT_FOLDER=/boot
18 | fi
19 |
20 | do_start () {
21 | text_file="${BOOT_FOLDER}/octopi-password.txt"
22 | if [ ! -f "$text_file" ]
23 | then
24 | exit 0
25 | fi
26 |
27 | new_password=`head -n1 "$text_file" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr -d '\n'`
28 | if [ ! -n "$new_password" ]
29 | then
30 | log_failure_msg "No new password provided, refusing to change to empty password"
31 | exit 1
32 | fi
33 |
34 | (echo "pi:$new_password" | chpasswd && rm "$text_file" && log_success_msg "Password for user pi changed and change file deleted") || log_failure_msg "Could not change password"
35 | }
36 |
37 | case "$1" in
38 | start|"")
39 | do_start
40 | ;;
41 | restart|reload|force-reload)
42 | echo "Error: argument '$1' not supported" >&2
43 | exit 3
44 | ;;
45 | stop)
46 | # No-op
47 | ;;
48 | *)
49 | echo "Usage: change_password [start|stop]" >&2
50 | exit 3
51 | ;;
52 | esac
53 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/logrotate.d/webcamd:
--------------------------------------------------------------------------------
1 | /var/log/webcamd.log
2 | {
3 | rotate 4
4 | weekly
5 | missingok
6 | notifempty
7 | compress
8 | delaycompress
9 | sharedscripts
10 | }
11 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/nginx/sites-available/default:
--------------------------------------------------------------------------------
1 | server {
2 | listen 127.0.0.1:28126;
3 |
4 | root /run/webcam;
5 |
6 | location / {
7 | # First attempt to serve request as file, then
8 | # as directory, then fall back to displaying a 404.
9 | try_files $uri $uri/ =404;
10 | }
11 | }
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/systemd/system/ffmpeg_hls.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=FFMPEG HLS webcam streaming service
3 | ConditionPathExists=/etc/octopi_streamer/hls
4 |
5 | [Service]
6 | User=root
7 | Restart=always
8 | RestartSec=5
9 | WatchdogSec=21600
10 | Nice=10
11 | ExecStartPre=/bin/rm -rf /run/webcam
12 | ExecStartPre=/bin/mkdir -p /run/webcam/hls
13 | ExecStartPre=/bin/mkdir -p /run/webcam/hls/240p
14 | ExecStartPre=/bin/mkdir -p /run/webcam/hls/480p
15 | ExecStartPre=/bin/mkdir -p /run/webcam/jpeg
16 | ExecStartPre=/bin/cp /var/lib/ffmpeg_hls/stream.m3u8 /run/webcam/hls/stream.m3u8
17 | ExecStartPre=/bin/chown -R webcam:webcam /run/webcam
18 | ExecStartPre=/bin/chmod -R 0755 /run/webcam
19 |
20 | ExecStart=/usr/bin/sudo -u webcam \
21 | /opt/ffmpeg-hls/ffmpeg \
22 | \
23 | -framerate 30 -video_size 640x480 \
24 | -i /dev/video0 \
25 | -pix_fmt yuv420p \
26 | \
27 | -c:v mjpeg -q:v 0 \
28 | -f image2 -r 1 -update 1 -atomic_writing 1 \
29 | /run/webcam/jpeg/frame.jpg \
30 | \
31 | -c:v h264_v4l2m2m -level:v 4.0 \
32 | -b:v 1264k -flags +cgop \
33 | -g 30 -keyint_min 30 \
34 | \
35 | -f hls -hls_time 1 \
36 | -hls_flags delete_segments+program_date_time+temp_file+independent_segments \
37 | -hls_allow_cache 0 -hls_segment_type fmp4 \
38 | -hls_list_size 32 -hls_delete_threshold 64 \
39 | /run/webcam/hls/480p/stream.m3u8 \
40 | \
41 | -vf scale=-1:240 \
42 | \
43 | -c:v h264_v4l2m2m -level:v 4.0 \
44 | -b:v 240k -flags +cgop \
45 | -g 30 -keyint_min 30 \
46 | \
47 | -f hls -hls_time 1 \
48 | -hls_flags delete_segments+program_date_time+temp_file+independent_segments \
49 | -hls_allow_cache 0 -hls_segment_type fmp4 \
50 | -hls_list_size 32 -hls_delete_threshold 64 \
51 | /run/webcam/hls/240p/stream.m3u8
52 |
53 | [Install]
54 | WantedBy=multi-user.target
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/systemd/system/gencert.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Ensure that haproxy certs are generated
3 |
4 | DefaultDependencies=no
5 |
6 | Before=network-pre.target
7 | Wants=network-pre.target
8 |
9 | After=local-fs.target
10 | Wants=local-fs.target
11 |
12 | [Service]
13 | Type=oneshot
14 | ExecStart=/root/bin/gencert
15 |
16 | [Install]
17 | WantedBy=multi-user.target
18 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/systemd/system/octoprint.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=The snappy web interface for your 3D printer
3 | After=network.online.target
4 | Wants=network.online.target
5 |
6 | [Service]
7 | Environment="HOST=127.0.0.1"
8 | Environment="PORT=5000"
9 | Environment="REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt"
10 | Type=simple
11 | User=1000
12 | ExecStart=/opt/octopi/oprint/bin/octoprint serve --host=${HOST} --port=${PORT}
13 |
14 | [Install]
15 | WantedBy=multi-user.target
16 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/systemd/system/streamer_select.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=OctoPi streamer selector
3 | Before=webcamd.service ffmpeg_hls.service nginx.service
4 |
5 | [Service]
6 | Type=oneshot
7 | ExecStart=/root/bin/streamer_select
8 |
9 | [Install]
10 | WantedBy=multi-user.target
11 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/systemd/system/user-fix.service:
--------------------------------------------------------------------------------
1 | # Written by Gina Häußge originally at https://github.com/OctoPrint/OctoPi-UpToDate/blob/e70ccdaf0cd4ef4adfaa3f9b6b288fb6bfda116a/scripts/files/user-fix.service
2 | [Unit]
3 | Description=Ensure that user name changes are applied as needed
4 |
5 | DefaultDependencies=no
6 |
7 | Before=network-pre.target
8 | Wants=network-pre.target
9 |
10 | After=local-fs.target
11 | Wants=local-fs.target
12 |
13 | [Service]
14 | Type=oneshot
15 | ExecStart=/root/bin/user-fix
16 |
17 | [Install]
18 | WantedBy=multi-user.target
19 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/systemd/system/webcamd.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=the OctoPi webcam daemon with the user specified config
3 | ConditionPathExists=/etc/octopi_streamer/mjpeg
4 |
5 | [Service]
6 | WorkingDirectory=/root/bin
7 | StandardOutput=append:/var/log/webcamd.log
8 | StandardError=append:/var/log/webcamd.log
9 | ExecStart=/root/bin/webcamd
10 | Restart=always
11 | Type=simple
12 | RestartSec=1
13 |
14 | [Install]
15 | WantedBy=multi-user.target
16 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/systemd/system/wifi_powersave@.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Set WiFi power save %i
3 | After=sys-subsystem-net-devices-wlan0.device
4 |
5 | [Service]
6 | Type=oneshot
7 | RemainAfterExit=yes
8 | ExecStart=/sbin/iw dev wlan0 set power_save %i
9 |
10 | [Install]
11 | WantedBy=sys-subsystem-net-devices-wlan0.device
12 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/etc/udev/rules.d/95-ads7846.rules:
--------------------------------------------------------------------------------
1 | SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{name}=="ADS7846*", SYMLINK+="input/touchscreen"
2 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/opt/octopi/scripts/add-octoprint-checkout:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | USER_NAME=$(id -nu 1000)'
3 | OCTOPRINT_FOLDER=/home/"${USER_NAME}"/OctoPrint
4 | OCTOPRINT_CONFIG=/home/"${USER_NAME}"/.octoprint/config.yaml
5 |
6 | if [ "${PWD}" == "${OCTOPRINT_FOLDER}" ]; then
7 | echo "Error: you are in the folder: "${OCTOPRINT_FOLDER}
8 | echo "This is where OctoPrint is going to be checked out, please change to a different folder before running this script"
9 | exit 1
10 | fi
11 |
12 | pause() {
13 | read -n1 -r -p $'Press any key to continue or Ctrl+C to exit...\n' key
14 | }
15 |
16 | echo
17 | echo "This will add a git checkout of OctoPrint to ~/OctoPrint."
18 | echo
19 | echo "This can be helpful if you want to run development branches"
20 | echo "of OctoPrint or do local development yourself."
21 | echo
22 | echo "It is however not needed for OctoPrint's normal operation."
23 | echo
24 | echo "If you do not want to add the git checkout after all, please"
25 | echo "hit Ctrl+C now."
26 | echo
27 |
28 | pause
29 |
30 | echo "--- Adding git checkout"
31 |
32 | rm -r $OCTOPRINT_FOLDER || true
33 | git clone https://github.com/foosel/OctoPrint.git $OCTOPRINT_FOLDER
34 |
35 | echo "--- Configuring checkout folder in OctoPrint's config.yaml"
36 |
37 | echo "plugins: {softwareupdate: {checks: {octoprint: {update_folder: $OCTOPRINT_FOLDER}}}}" | yq m -i $OCTOPRINT_CONFIG -
38 |
39 | echo
40 | echo "--- Done!"
41 | echo
42 |
43 | echo "Your git checkout is now available at ~/OctoPrint. Please note that it"
44 | echo "is currently not installed. If you want to replace the default installation"
45 | echo "of OctoPrint with whatever is currently checked out in your git checkout"
46 | echo "you'll need to do this manually. You'll also need to keep your checkout"
47 | echo "up to date manually if you still have OctoPrint's update mode set to release"
48 | echo "tracking."
49 | echo
50 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/opt/octopi/scripts/install-desktop:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ "$(id -u)" != "0" ]
4 | then
5 | echo "Please run this with sudo or as user root" 2>&1
6 | echo "Since we need to install a couple of packages, sudo" 2>&1
7 | echo "actually IS needed here. Thanks :)" 2>&1
8 | exit 1
9 | fi
10 |
11 | pause() {
12 | read -n1 -r -p $'Press any key to continue or Ctrl+C to exit...\n' key
13 | }
14 |
15 | echo
16 | echo "This will install the desktop environment on your Pi"
17 | echo "Please keep in mind that the desktop environment needs"
18 | echo "system resources that then might not be available for"
19 | echo "printing, possible leading to print artifacts."
20 | echo "It is not recommended to run the desktop environment"
21 | echo "alongside OctoPrint if you do not have a Pi with"
22 | echo "multiple cores (e.g. Pi1 or PiZero). Even then, use"
23 | echo "at your own risk."
24 | echo
25 | echo "If you do not want to install the desktop environment"
26 | echo "after all, please hit Ctrl+C now."
27 | echo
28 |
29 | pause
30 |
31 | echo
32 | echo "The desktop environment can be set up to start"
33 | echo "automatically when the Pi boots."
34 | echo "If you want to have it set up this way, please"
35 | echo "type 'yes' now. Type 'no' if not."
36 | echo -n "Finish with ENTER: "
37 |
38 | read x_on_boot
39 | [ "$x_on_boot" == "yes" ] || x_on_boot="no"
40 |
41 | echo
42 | echo "Going to install the desktop environment (automatic start on boot: $x_on_boot)"
43 | echo
44 | echo "This will take a while, do NOT switch off the Pi or close this console until done!"
45 | echo
46 |
47 | echo
48 | echo "--- Updating our package list"
49 | echo
50 |
51 | apt-get update
52 |
53 | echo
54 | echo "--- Installing desktop packages"
55 | echo
56 |
57 | apt-get install --yes raspberrypi-ui-mods
58 |
59 | if [ "$x_on_boot" == "yes" ]
60 | then
61 | echo
62 | echo "--- Setting up Pi to boot to desktop"
63 | echo
64 | systemctl set-default graphical.target
65 | else
66 | echo
67 | echo "--- Setting up Pi to not boot to desktop"
68 | echo
69 | systemctl set-default multi-user.target
70 | fi
71 |
72 | echo
73 | echo "--- Done!"
74 | echo
75 |
76 | echo "You might want to reboot now: sudo reboot"
77 | echo
78 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/opt/octopi/scripts/safemode:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if grep -q "startOnceInSafeMode" ~/.octoprint/config.yaml;
4 | then
5 | # If found,replace the existing line
6 | sed -i 's/.*startOnceInSafeMode: false.*/\ \ startOnceInSafeMode: true/' ~/.octoprint/config.yaml
7 | else
8 | # Append otherwise
9 | sed -i '/server:/a \ \ startOnceInSafeMode: true' ~/.octoprint/config.yaml
10 | fi
11 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/opt/octopi/scripts/welcome:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | _NAME=$(hostname)
4 | _IP=$(hostname -I)
5 | _OCTOPRINT_VERSION=$(/opt/octopi/oprint/bin/python -c "from octoprint._version import get_versions; print(get_versions()['version'])" || echo "unknown")
6 | _OCTOPI_VERSION=$(cat /etc/octopi_version || echo "unknown")
7 |
8 | echo
9 | echo "------------------------------------------------------------------------------"
10 | echo "Access OctoPrint from a web browser on your network by navigating to any of:"
11 | echo
12 |
13 | for name in $_NAME;
14 | do
15 | echo " http://$name.local"
16 | done
17 | for ip in $_IP;
18 | do
19 | if [[ $ip =~ .*:.* ]]
20 | then
21 | echo " http://[$ip]"
22 | else
23 | echo " http://$ip"
24 | fi
25 | done
26 |
27 | echo
28 | echo "https is also available, with a self-signed certificate."
29 |
30 | if ! which lightdm 2>&1 >/dev/null;
31 | then
32 | echo "------------------------------------------------------------------------------"
33 | echo "This image comes without a desktop environment installed because it's not "
34 | echo "required for running OctoPrint. If you want a desktop environment you can "
35 | echo "install it via"
36 | echo
37 | echo " sudo /opt/octopi/scripts/install-desktop"
38 | fi
39 |
40 | echo "------------------------------------------------------------------------------"
41 | echo "OctoPrint version : $_OCTOPRINT_VERSION"
42 | echo "OctoPi version : $_OCTOPI_VERSION"
43 | echo "------------------------------------------------------------------------------"
44 | echo
45 |
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/usr/lib/systemd/system/nginx.service:
--------------------------------------------------------------------------------
1 | # NGINX service definition based on Debian buster version.
2 | [Unit]
3 | Description=NGINX server for serving HLS and JPEG frames
4 | Documentation=man:nginx(8)
5 | After=network.target nss-lookup.target
6 | ConditionPathExists=/etc/octopi_streamer/hls
7 |
8 | [Service]
9 | Type=forking
10 | PIDFile=/run/nginx.pid
11 | ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
12 | ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
13 | ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
14 | ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid
15 | TimeoutStopSec=5
16 | KillMode=mixed
17 | Nice=10
18 |
19 | [Install]
20 | WantedBy=multi-user.target
--------------------------------------------------------------------------------
/src/modules/octopi/filesystem/root/var/lib/ffmpeg_hls/stream.m3u8:
--------------------------------------------------------------------------------
1 | #EXTM3U
2 | #EXT-X-VERSION:3
3 | #EXT-X-STREAM-INF:BANDWIDTH=245760,RESOLUTION=320x240
4 | 240p/stream.m3u8
5 | #EXT-X-STREAM-INF:BANDWIDTH=1294336,RESOLUTION=640x480
6 | 480p/stream.m3u8
--------------------------------------------------------------------------------
/src/modules/octopi/start_chroot_script:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # OctoPI generation script
3 | # Helper script that runs in a Raspbian chroot to create the OctoPI distro
4 | # Written by Guy Sheffer