31 lines
1.2 KiB
Bash
31 lines
1.2 KiB
Bash
#!/usr/bin/with-contenv bashio
|
|
|
|
bashio::log.info "--- START DES SUPER-DEBUG-SKRIPTS ---"
|
|
|
|
bashio::log.info "Schritt A: Überprüfe und setze Berechtigungen für das Expect-Skript..."
|
|
chmod +x /tuya_auth_login.exp
|
|
bashio::log.info "Berechtigungen gesetzt. Hier ist der Verzeichnis-Inhalt von /:"
|
|
ls -l /
|
|
bashio::log.info "Berechtigungs-Check abgeschlossen."
|
|
|
|
# Konfiguration lesen
|
|
readonly TUYA_EMAIL=$(bashio::config 'TUYA_EMAIL')
|
|
readonly TUYA_PASSWORD=$(bashio::config 'TUYA_PASSWORD')
|
|
readonly TUYA_REGION=$(bashio::config 'TUYA_REGION')
|
|
|
|
bashio::log.info "Schritt B: Konfiguration wurde gelesen."
|
|
bashio::log.info "Region: ${TUYA_REGION}, Email: ${TUYA_EMAIL}"
|
|
|
|
bashio::log.info "Schritt C: Starte den Authentifizierungsprozess..."
|
|
printf "%s\n%s\n%s\n" "${TUYA_REGION}" "${TUYA_EMAIL}" "${TUYA_PASSWORD}" | /tuya_auth_login.exp
|
|
EXIT_CODE=$?
|
|
bashio::log.warning "Authentifizierungsprozess wurde mit Exit-Code beendet: ${EXIT_CODE}"
|
|
|
|
bashio::log.info "Schritt D: Authentifizierungsprozess ist beendet."
|
|
bashio::log.info "Wenn das Log hier endet, ist der Authentifizierungsprozess abgestürzt."
|
|
|
|
bashio::log.info "--- SUPER-DEBUG-SKRIPT BEENDET ---"
|
|
bashio::log.warning "Das Addon wird nun stoppen. Bitte kopieren Sie das gesamte Log."
|
|
|
|
exit 0
|