From 1f9136ec262e5acccaa8c4c48f7a8199ccc115b6 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Fri, 28 Oct 2022 16:00:38 +0200 Subject: [PATCH] Update OctoPrint version, re-add adding user. --- 3dprinter-octoprint/CHANGELOG.md | 5 +++-- 3dprinter-octoprint/build.yaml | 2 +- 3dprinter-octoprint/config.yaml | 2 +- .../rootfs/etc/cont-init.d/octoprint.sh | 14 +++++++------- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/3dprinter-octoprint/CHANGELOG.md b/3dprinter-octoprint/CHANGELOG.md index b8841e8..01084fc 100644 --- a/3dprinter-octoprint/CHANGELOG.md +++ b/3dprinter-octoprint/CHANGELOG.md @@ -1,4 +1,5 @@ -- Update icon to colored nozzle. -- Cleanup Caddy config. +- Update OctoPrint to 1.8.6 +- Update icon to coloured nozzle. +- Clean-up Caddy config. - Fixes to Caddy XDG paths - Change reverse proxy from nginx to Caddy \ No newline at end of file diff --git a/3dprinter-octoprint/build.yaml b/3dprinter-octoprint/build.yaml index 0caee25..28f6dc1 100644 --- a/3dprinter-octoprint/build.yaml +++ b/3dprinter-octoprint/build.yaml @@ -9,4 +9,4 @@ labels: org.opencontainers.image.description: "3DPrinter-OctoPrint addon for Home-Assistant." org.opencontainers.image.source: "https://github.com/fredrikbaberg/3dprinter-addons" args: - OCTOPRINT_VERSION: "1.8.4" + OCTOPRINT_VERSION: "1.8.6" diff --git a/3dprinter-octoprint/config.yaml b/3dprinter-octoprint/config.yaml index faa7cd5..1497cb8 100644 --- a/3dprinter-octoprint/config.yaml +++ b/3dprinter-octoprint/config.yaml @@ -1,5 +1,5 @@ name: "3DPrinter-OctoPrint" -version: "2022.10.02" +version: "2022.10.03" slug: "3dprinter-octoprint" description: "OctoPrint as an addon, no additional bells and whistles." url: "https://github.com/fredrikbaberg/home-assistant-addons/tree/main/3dprinter-octoprint" diff --git a/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh b/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh index 961ea4c..c649c72 100644 --- a/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh +++ b/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh @@ -29,10 +29,10 @@ if [ ! -f /data/config/octoprint/config.yaml ]; then fi # TODO: Check if user exists before setting password. -# { # Make sure Ingress user for OctoPrint exists. -# bashio::log.notice "Ensure Ingress user (homeassistant) exist." -# new_password=$(date +%s | sha256sum | base64 | head -c 32 ; echo) -# octoprint --basedir /data/config/octoprint user add homeassistant --password "$new_password" --group users --group admins # 2> /dev/null -# } || { # catch -# bashio::log.warning "Failed to ensure Ingress user exists, may not be able to launch." -# } +{ # Make sure Ingress user for OctoPrint exists. + bashio::log.notice "Ensure Ingress user (homeassistant) exist." + new_password=$(date +%s | sha256sum | base64 | head -c 32 ; echo) + octoprint --basedir /data/config/octoprint user add homeassistant --password "$new_password" --group users --group admins # 2> /dev/null +} || { # catch + bashio::log.warning "Failed to ensure Ingress user exists, may not be able to launch." +}