From a9877c2c4150c5bc4ffe60915e0f0f25574391b1 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 16 Oct 2021 16:46:30 +0200 Subject: [PATCH] Test other logic --- portainer/rootfs/etc/services.d/portainer/run | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/portainer/rootfs/etc/services.d/portainer/run b/portainer/rootfs/etc/services.d/portainer/run index df2ccd37e..44061080d 100644 --- a/portainer/rootfs/etc/services.d/portainer/run +++ b/portainer/rootfs/etc/services.d/portainer/run @@ -34,6 +34,9 @@ fi # Set password CURRENTPASSWORD="" PASSWORD=$(bashio::config 'password') +if ! bashio::config.has_value 'password'; then + PASSWORD="a" +fi touch "/data/portainer_password" CURRENTPASSWORD=$( cat /data/portainer_password ) @@ -47,8 +50,7 @@ if bashio::fs.file_exists "/data/hidden"; then fi # Define option -if [ ${#PASSWORD} -ge 2 ] ; then - # More than 2 letters, set password +if bashio::config.has_value 'password' ; then echo -n $PASSWORD > /data/portainer_password options+=(--admin-password-file /data/portainer_password) bashio::log.info "... password set to $PASSWORD"