mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 06:14:07 +02:00
Test other logic
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user