Test other logic

This commit is contained in:
Alexandre
2021-10-16 16:46:30 +02:00
committed by GitHub
parent 178de2d7b5
commit a9877c2c41

View File

@@ -34,6 +34,9 @@ fi
# Set password # Set password
CURRENTPASSWORD="" CURRENTPASSWORD=""
PASSWORD=$(bashio::config 'password') PASSWORD=$(bashio::config 'password')
if ! bashio::config.has_value 'password'; then
PASSWORD="a"
fi
touch "/data/portainer_password" touch "/data/portainer_password"
CURRENTPASSWORD=$( cat /data/portainer_password ) CURRENTPASSWORD=$( cat /data/portainer_password )
@@ -47,8 +50,7 @@ if bashio::fs.file_exists "/data/hidden"; then
fi fi
# Define option # Define option
if [ ${#PASSWORD} -ge 2 ] ; then if bashio::config.has_value 'password' ; then
# More than 2 letters, set password
echo -n $PASSWORD > /data/portainer_password echo -n $PASSWORD > /data/portainer_password
options+=(--admin-password-file /data/portainer_password) options+=(--admin-password-file /data/portainer_password)
bashio::log.info "... password set to $PASSWORD" bashio::log.info "... password set to $PASSWORD"