Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit 50e9af6

Browse files
authored
Patch 001 (#28)
* Updates001 * remove canserial * update build * Normalize all the line endings * Allow cmake downgrades
1 parent 7c1da21 commit 50e9af6

File tree

5 files changed

+42
-39
lines changed

5 files changed

+42
-39
lines changed

.actrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-P ubuntu-latest=catthehacker/ubuntu:act-latest
2+
-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
3+
-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
4+
ubuntu-16.04=catthehacker/ubuntu:act-16.04

src/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export DIST_NAME=MainSailOS
22
export DIST_VERSION=0.2.0
33
export BASE_IMAGE_ENLARGEROOT=2000
44
export BASE_IMAGE_RESIZEROOT=500
5-
export MODULES="base(network,raspicam,klipper_moonraker,canserial,mainsail,mjpgstreamer,password-for-sudo)"
5+
export MODULES="base(network,raspicam,mjpgstreamer,password-for-sudo)"

src/modules/klipper_moonraker/filesystem/home/pi/klipper_config/moonraker.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ trusted_clients:
3131
[update_manager client mainsail]
3232
type: web
3333
repo: meteyou/mainsail
34-
path: ~/mainsail
34+
path: ~/mainsail
Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
server {
2-
listen 80 default_server;
3-
4-
access_log /var/log/nginx/mainsail-access.log;
5-
error_log /var/log/nginx/mainsail-error.log;
6-
1+
server {
2+
listen 80 default_server;
3+
4+
access_log /var/log/nginx/mainsail-access.log;
5+
error_log /var/log/nginx/mainsail-error.log;
6+
77
#disable this section on smaller hardware like a pi zero
88
gzip on;
99
gzip_vary on;
@@ -14,43 +14,42 @@ server {
1414
gzip_http_version 1.1;
1515
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml;
1616

17-
#web_path from mainsail static files
18-
root /home/pi/mainsail;
19-
20-
index index.html;
21-
server_name _;
22-
23-
#max upload size for gcodes (0 = no limit)
24-
client_max_body_size 0;
25-
26-
location / {
27-
try_files $uri $uri/ /index.html;
17+
#web_path from mainsail static files
18+
root /home/pi/mainsail;
19+
20+
index index.html;
21+
server_name _;
22+
23+
proxy_request_buffering off;
24+
25+
location / {
26+
try_files $uri $uri/ /index.html;
2827
}
2928

3029
location = /index.html {
3130
add_header Cache-Control "no-store, no-cache, must-revalidate";
32-
}
33-
34-
location /websocket {
35-
proxy_pass http://apiserver/websocket;
36-
proxy_http_version 1.1;
37-
proxy_set_header Upgrade $http_upgrade;
38-
proxy_set_header Connection $connection_upgrade;
39-
proxy_set_header Host $http_host;
40-
proxy_set_header X-Real-IP $remote_addr;
41-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
42-
proxy_read_timeout 86400;
43-
}
44-
31+
}
32+
33+
location /websocket {
34+
proxy_pass http://apiserver/websocket;
35+
proxy_http_version 1.1;
36+
proxy_set_header Upgrade $http_upgrade;
37+
proxy_set_header Connection $connection_upgrade;
38+
proxy_set_header Host $http_host;
39+
proxy_set_header X-Real-IP $remote_addr;
40+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
41+
proxy_read_timeout 86400;
42+
}
43+
4544
location ~ ^/(printer|api|access|machine|server)/ {
4645
proxy_pass http://apiserver$request_uri;
4746
proxy_set_header Host $http_host;
4847
proxy_set_header X-Real-IP $remote_addr;
4948
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
5049
proxy_set_header X-Scheme $scheme;
51-
}
52-
53-
location /webcam/ {
54-
proxy_pass http://mjpgstreamer/;
55-
}
56-
}
50+
}
51+
52+
location /webcam/ {
53+
proxy_pass http://mjpgstreamer/;
54+
}
55+
}

src/modules/mjpgstreamer/start_chroot_script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ unpack /filesystem/boot /boot
1919
WEBCAM_USER=webcam
2020

2121
apt update
22-
apt install -y git cmake
22+
apt install -y --allow-downgrades git cmake=3.13.4-1 cmake-data=3.13.4-1
2323
cd /home/pi
2424
#mjpg-streamer
2525
if [ "$MJPGSTREAMER_INCLUDE_MJPGSTREAMER" == "yes" ]

0 commit comments

Comments
 (0)