alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.58k stars 225 forks source link

🐛 [Calibre_web] Cannot login after fresh install #850

Closed PaulAmor closed 1 year ago

PaulAmor commented 1 year ago

Which addon?

Describe the bug

After fresh install with clean settings, calibre-web does not recognize the expected admin/admin123 authentication details and instead report incorrect username and password.

The issue seems to be related to the addition of ingress support, as part of the start up script, calibre_web/rootfs/etc/cont-init.d/80-configuration.sh uses the sqlite3 command to change some settings in the calibre_web database. This appears to stop authentication working somehow.

To Reproduce

  1. Remove the addon and all settings from home assistant configuration folder
  2. Install and start the add-on

Work around Adding the following to /config/addons_autoscripts/calibre-web.sh allows the addon to start, after it has been configured then a restart or the add-in will support ingress

#!/usr/bin/with-contenv bashio
# shellcheck shell=bash

if [ ! -f /config/addons_config/calibre-web/app.db ]; then
    bashio::log.warning "Disabling Ingress until addon restart"
    sed -i "s/sqlite3/# sqlite3/g" /etc/cont-init.d/80-configuration.sh
fi
alexbelgium commented 1 year ago

Thanks very much! I've pushed a new version with your proposed code (tweaked to integrate in the main logic).