fix(birdnet-pi): honor standalone pi password

This commit is contained in:
Alexandre
2025-08-10 21:08:58 +02:00
parent 8db3f124f9
commit ea908e5626
3 changed files with 15 additions and 3 deletions

View File

@@ -21,9 +21,17 @@ fi
# Set password
bashio::log.info "Setting password for the user pi"
if bashio::config.has_value "pi_password"; then
echo "pi:$(bashio::config "pi_password")" | chpasswd
PI_PASSWORD="$(bashio::config "pi_password")"
elif [[ -n "${pi_password:-}" ]]; then
PI_PASSWORD="${pi_password}"
fi
if [[ -n "${PI_PASSWORD:-}" ]]; then
echo "pi:${PI_PASSWORD}" | chpasswd
bashio::log.info "Password set successfully for user pi."
else
bashio::log.info "No password specified for user pi. Keeping existing password."
fi
bashio::log.info "Password set successfully for user pi."
# Use timezone defined in add-on options if available
bashio::log.info "Setting timezone :"