mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-15 21:31:50 +02:00
Update run
This commit is contained in:
@@ -35,11 +35,11 @@ fi
|
|||||||
# Set password
|
# Set password
|
||||||
CURRENTPASSWORD=""
|
CURRENTPASSWORD=""
|
||||||
PASSWORD=$(bashio::config 'password')
|
PASSWORD=$(bashio::config 'password')
|
||||||
if bashio::config.true "disable_password"; then
|
if ! bashio::config.has_value 'password'; then
|
||||||
PASSWORD="empty"
|
PASSWORD="empty"
|
||||||
touch "/data/portainer_password"
|
|
||||||
CURRENTPASSWORD=$( cat /data/portainer_password )
|
|
||||||
fi
|
fi
|
||||||
|
touch "/data/portainer_password"
|
||||||
|
CURRENTPASSWORD=$( cat /data/portainer_password )
|
||||||
|
|
||||||
# Reset password if not first run
|
# Reset password if not first run
|
||||||
if bashio::fs.file_exists "/data/hidden"; then
|
if bashio::fs.file_exists "/data/hidden"; then
|
||||||
@@ -51,7 +51,7 @@ if bashio::fs.file_exists "/data/hidden"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Define option
|
# Define option
|
||||||
if ! bashio::config.true "disable_password"; then
|
if bashio::config.has_value 'password' ; then
|
||||||
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