Merge pull request #16 from fredrikbaberg/dev

Set default password to something known, for testing.
This commit is contained in:
Fredrik Baberg 2022-11-03 02:43:09 +01:00 committed by GitHub
commit 464850c6c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
name: "3DPrinter-OctoPrint"
version: "2022.11.0"
version: "2022.11.1"
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"

View File

@ -31,7 +31,8 @@ fi
# TODO: Check if user already 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)
# new_password=$(date +%s | sha256sum | base64 | head -c 32 ; echo)
new_password=homeassistant
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."