From 556e3176f282ccb4fb5f59dd9f93be9220d0900d Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 26 Nov 2023 11:57:12 +0100 Subject: [PATCH] Allow to disable password for oauth https://github.com/alexbelgium/hassio-addons/issues/1095 --- portainer/rootfs/etc/services.d/portainer/run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/portainer/rootfs/etc/services.d/portainer/run b/portainer/rootfs/etc/services.d/portainer/run index d7d6afc9f..84c3b6084 100644 --- a/portainer/rootfs/etc/services.d/portainer/run +++ b/portainer/rootfs/etc/services.d/portainer/run @@ -35,11 +35,11 @@ fi # Set password CURRENTPASSWORD="" PASSWORD=$(bashio::config 'password') -if ! bashio::config.has_value 'password'; then +if bashio::config.true "disable_password"; then PASSWORD="empty" + touch "/data/portainer_password" + CURRENTPASSWORD=$( cat /data/portainer_password ) fi -touch "/data/portainer_password" -CURRENTPASSWORD=$( cat /data/portainer_password ) # Reset password if not first run if bashio::fs.file_exists "/data/hidden"; then @@ -51,7 +51,7 @@ if bashio::fs.file_exists "/data/hidden"; then fi # Define option -if bashio::config.has_value 'password' ; then +if ! bashio::config.true "disable_password"; then echo -n $PASSWORD > /data/portainer_password options+=(--admin-password-file /data/portainer_password) bashio::log.info "... password set to $PASSWORD"