Frontend improvements, HTTP redirect, touchscreen calibrator

Updated TODO

Frontend will now wait for Nginx or the override address to come up as
well as OctoPrint if it is enabled

Nginx will now redirect HTTP connections on port 443 to HTTPS

Raspberry Pi camera is now enabled when MJPG streamer is enabled

Added touch screen calibration program (still needs a menu entry)

Deleted EXPORT_NOOBS since I hate it
This commit is contained in:
Logan G 2020-08-19 22:04:44 -06:00
parent 9ef18614cc
commit ce2e05165c
Signed by: logan
GPG key ID: E328528C921E7A7A
8 changed files with 13 additions and 9 deletions

View file

@ -3,7 +3,6 @@
## First time/Octo-Config ## First time/Octo-Config
- Add network configuration (replace nmtui) - Add network configuration (replace nmtui)
- Add hostname configuration (replace nmtui) - Add hostname configuration (replace nmtui)
- Timezone selection
## Misc ## Misc
- More security - More security
@ -13,4 +12,4 @@
- Python 3 - Python 3
- Detect if frontend did not load correctly (probably not easy) - Detect if frontend did not load correctly (probably not easy)
- HTTP/Port 80 redirect - HTTP/Port 80 redirect
- https://github.com/blueimp/mjpeg-server

View file

@ -13,11 +13,16 @@ fi
# Override the automatically detected address if the user wants to # Override the automatically detected address if the user wants to
if [[ -f ~/.overrideurl.sh ]]; then source ~/.overrideurl.sh; fi if [[ -f ~/.overrideurl.sh ]]; then source ~/.overrideurl.sh; fi
# Wait until OctoPrint comes up # Wait until Nginx/override comes up
while ! curl "$ADDRESS" 2>&1 >/dev/null; do while ! curl "$ADDRESS" 2>&1 >/dev/null; do
sleep 1 sleep 1
done done
# Wait until OctoPrint comes up if it is enabled
while [[ -f /etc/systemd/system/multi-user.target.wants/octoprint.service ]] && ! curl "localhost:5000"; do
sleep 1
done
###### ######
## Opens browser ## Opens browser
# -t | Disables strict TLS check # -t | Disables strict TLS check

View file

@ -29,6 +29,7 @@
ssl_certificate /etc/ssl/certs/nginx-octoprint.crt; ssl_certificate /etc/ssl/certs/nginx-octoprint.crt;
ssl_certificate_key /etc/ssl/private/nginx-octoprint.key; ssl_certificate_key /etc/ssl/private/nginx-octoprint.key;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains"; add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
error_page 497 https://$host$request_uri;
server_name localhost; server_name localhost;
location / { location / {

View file

@ -51,8 +51,10 @@ service_select () {
if [[ $ENABLE_MJPG == true ]]; then if [[ $ENABLE_MJPG == true ]]; then
systemctl enable mjpg-streamer systemctl enable mjpg-streamer
raspi-config nonint do_camera 0 # Counter intuitively enables the camera
else else
systemctl disable mjpg-streamer systemctl disable mjpg-streamer
raspi-config nonint do_camera 1 # Disables the camera
fi fi
if [[ $ENABLE_GUI == true ]]; then if [[ $ENABLE_GUI == true ]]; then

View file

@ -1,4 +1,4 @@
IMG_SUFFIX="" IMG_SUFFIX="-nogui"
if [ "${USE_QEMU}" = "1" ]; then if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu" export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi fi

View file

@ -1,2 +0,0 @@
NOOBS_NAME="Octoprint"
NOOBS_DESCRIPTION="A fork of Raspbian with Octoprint"

View file

@ -18,3 +18,4 @@ obconf
arandr arandr
openbox openbox
nodm nodm
xinput-calibrator

View file

@ -1,2 +0,0 @@
NOOBS_NAME="Octoprint Kiosk"
NOOBS_DESCRIPTION="A fork of Raspbian that includes OctoPrint and a nice frontend"