From 8428b4ccb50fb6a219dd0c51b274d79b02023365 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 6 Oct 2024 14:58:34 +0200 Subject: [PATCH] Change logic for log trigger https://github.com/alexbelgium/hassio-addons/issues/1587 --- portainer/rootfs/etc/services.d/portainer/run | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/portainer/rootfs/etc/services.d/portainer/run b/portainer/rootfs/etc/services.d/portainer/run index 3cc54b05d..b96323631 100644 --- a/portainer/rootfs/etc/services.d/portainer/run +++ b/portainer/rootfs/etc/services.d/portainer/run @@ -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 ###################