Change logic for log trigger

https://github.com/alexbelgium/hassio-addons/issues/1587
This commit is contained in:
Alexandre
2024-10-06 14:58:34 +02:00
committed by GitHub
parent 1014ab1653
commit 8428b4ccb5

View File

@@ -56,14 +56,14 @@ if bashio::fs.file_exists "$HIDDEN_FILE"; then
fi
# Define option
echo -n "${PASSWORD:-empty}" > "$PASSWORD_FILE"
if bashio::config.has_value 'password'; then
options+=(--admin-password-file "$PASSWORD_FILE")
bashio::log.info "... password set according to add-on options."
else
echo -n "$PASSWORD" > "$PASSWORD_FILE"
if [[ "$PASSWORD" = "empty" ]]; then
bashio::log.info "... starting without predefined password."
bashio::log.warning "If this is your first boot, you have a 5 minutes time period to perform the initial set-up."
bashio::log.warning "If you don't do it, you would be faced with a 404 error and will need to restart the add-on to access the set-up page."
else
options+=(--admin-password-file "$PASSWORD_FILE")
bashio::log.info "... password set according to add-on options."
fi
###################