Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
settings:
web:
label: Web
remote_access:
label: Remote Access
items:
authorization:
label: Moonraker Authentication (Experimental)
label: Web Authentication (Experimental)
get_cmd:
- bash
- -c
Expand All @@ -16,13 +16,19 @@ settings:
- bash
- -c
- |
FRONTEND=$(/usr/local/bin/extended-config.py get /home/lava/printer_data/config/extended/extended.cfg web frontend fluidd)
FRONTEND=$(/usr/local/bin/extended-config.py get /home/lava/printer_data/config/extended/extended2.cfg web frontend fluidd)
if [ "$FRONTEND" = "mainsail" ]; then
echo "ERROR: Authentication requires Fluidd."
echo "Mainsail does not support Moonraker authentication."
echo "Please switch to Fluidd first."
exit 1
fi
CLOUD=$(/usr/local/bin/extended-config.py get /home/lava/printer_data/config/extended/extended2.cfg remote_access cloud none)
if [ "$CLOUD" = "octoeverywhere" ]; then
echo "ERROR: OctoEverywhere companion mode is incompatible with authentication."
echo "Disable OctoEverywhere first to enable authentication."
exit 1
fi
URL="http://127.0.0.1:7125"
echo "Deleting existing admin user..."
/usr/local/bin/curl -s -X DELETE "$URL/access/user" -H "Content-Type: application/json" -d '{"username": "admin"}' > /dev/null 2>&1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ config_json() {
"ServiceName": "octoeverywhere",
"VirtualEnvPath": "/oem/apps/octoeverywhere/venv",
"RepoRootFolder": "/oem/apps/octoeverywhere/latest",
"IsCompanion": false,
"MoonrakerConfigFile": "/home/lava/printer_data/config/moonraker.conf"
"IsCompanion": true
}
EOF
}

# Set address to Moonraker, as required by companion mode
/usr/local/bin/extended-config.py add /home/lava/printer_data/config/octoeverywhere.conf companion ip_or_hostname localhost
/usr/local/bin/extended-config.py add /home/lava/printer_data/config/octoeverywhere.conf companion port 7125

mkdir -p "$STATE_DIR"

# Tune malloc for embedded systems, so PY doesn't each so much memory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ settings:
- bash
- -ec
- |
if test -f /oem/printer_data/config/extended/moonraker/authorization.cfg; then
echo "ERROR: Authentication is incompatible with OctoEverywhere companion mode."
echo "Disable authentication first to enable OctoEverywhere."
exit 1
fi
echo "WARNING: OctoEverywhere support is experimental. Higher resource usage may affect print quality."
sleep 5

Expand Down

This file was deleted.

Loading