mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Change config location https://github.com/alexbelgium/hassio-addons/issues/1177
This commit is contained in:
@@ -1,52 +1,72 @@
|
||||
- ⚠ MAJOR CHANGE : switch to the new config logic from homeassistant. Your configuration files will have migrated from /config/hassio_addons/calibre-web to a folder only accessible from my Filebrowser addon called /addon_configs/something-calibre-web. This avoids the addon to mess with your homeassistant configuration folder, and allows to backup the options. Migration of data, custom configs, and custom scripts should be automatic. Please be sure to update all your links however ! For more information, see here : https://developers.home-assistant.io/blog/2023/11/06/public-addon-config/ https://github.com/alexbelgium/hassio-addons/issues/1177
|
||||
|
||||
### 0.6.21-2 (05-11-2023)
|
||||
|
||||
- Minor bugs fixed
|
||||
- Fix : https://github.com/alexbelgium/hassio-addons/issues/1050 @klassm
|
||||
|
||||
## 0.6.21 (28-10-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20 (26-08-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls225 (26-08-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls224 (19-08-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls222 (12-08-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls221 (05-08-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls220 (23-07-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls219 (22-07-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls218 (15-07-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls217 (08-07-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls216 (01-07-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls215 (24-06-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls214 (17-06-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls213 (10-06-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
## 0.6.20-ls212 (03-06-2023)
|
||||
|
||||
- Update to latest version from linuxserver/docker-calibre-web
|
||||
|
||||
### 0.6.20-ls211-2 (30-05-2023)
|
||||
|
||||
- Minor bugs fixed
|
||||
- Fix : allow app to start on clean install @PaulAmor https://github.com/alexbelgium/hassio-addons/issues/850
|
||||
|
||||
|
||||
@@ -37,12 +37,12 @@ RUN \
|
||||
|
||||
# Global LSIO modifications
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh"
|
||||
ARG CONFIGLOCATION="/config/addons_config/calibre-web"
|
||||
ARG CONFIGLOCATION="/config"
|
||||
RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh
|
||||
|
||||
# Specific images modifications
|
||||
RUN \
|
||||
usermod --home /config/addons_config/calibre abc
|
||||
usermod --home /config abc
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -59,11 +59,11 @@
|
||||
],
|
||||
"environment": {
|
||||
"DOCKER_MODS": "linuxserver/mods:universal-calibre",
|
||||
"FM_HOME": "/config/addons_config/calibre-web",
|
||||
"HOME": "/config/addons_config/calibre-web",
|
||||
"FM_HOME": "/config",
|
||||
"HOME": "/config",
|
||||
"PGID": "0",
|
||||
"PUID": "0",
|
||||
"calibre-web_CONFIG_DIRECTORY": "/config/addons_config/calibre-web",
|
||||
"calibre-web_CONFIG_DIRECTORY": "/config",
|
||||
"shm_size": "1gb"
|
||||
},
|
||||
"hassio_api": true,
|
||||
@@ -110,6 +110,6 @@
|
||||
"slug": "calibre-web",
|
||||
"udev": true,
|
||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/calibre_web",
|
||||
"version": "0.6.21-4",
|
||||
"version": "0.6.21-5",
|
||||
"video": true
|
||||
}
|
||||
|
||||
13
calibre_web/rootfs/etc/cont-init.d/00-a_migrate.sh
Normal file
13
calibre_web/rootfs/etc/cont-init.d/00-a_migrate.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
####################
|
||||
# Migrate database #
|
||||
####################
|
||||
|
||||
if [ -d /homeassistant/addons_config/calibre-web ]; then
|
||||
echo "Moving database to new location /config"
|
||||
cp -rf /homeassistant/addons_config/calibre-web/* /config/
|
||||
rm -r /homeassistant/addons_config/calibre-web
|
||||
fi
|
||||
@@ -11,7 +11,7 @@ LOCATION=$(bashio::config 'data_location')
|
||||
|
||||
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then
|
||||
# Default location
|
||||
LOCATION="/config/addons_config/calibre-web"
|
||||
LOCATION="/config"
|
||||
else
|
||||
bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
|
||||
|
||||
@@ -24,7 +24,7 @@ else
|
||||
done
|
||||
|
||||
if [ -z "$LOCATIONOK" ]; then
|
||||
LOCATION=/config/addons_config/${HOSTNAME#*-}
|
||||
LOCATION=/config
|
||||
bashio::log.fatal "Your data_location value can only be set in /share, /config or /data (internal to addon). It will be reset to the default location : $LOCATION"
|
||||
fi
|
||||
|
||||
@@ -34,9 +34,9 @@ fi
|
||||
bashio::log.info "Setting data location to $LOCATION"
|
||||
sed -i "1a export HOME=$LOCATION" /etc/services.d/*/run
|
||||
sed -i "1a export FM_HOME=$LOCATION" /etc/services.d/*/run
|
||||
sed -i "s|/config/addons_config/calibre-web|$LOCATION|g" /defaults/*
|
||||
sed -i "s|/config/addons_config/calibre-web|$LOCATION|g" /etc/cont-init.d/*
|
||||
sed -i "s|/config/addons_config/calibre-web|$LOCATION|g" /etc/services.d/*/run
|
||||
sed -i "s|/config|$LOCATION|g" /defaults/*
|
||||
sed -i "s|/config|$LOCATION|g" /etc/cont-init.d/*
|
||||
sed -i "s|/config|$LOCATION|g" /etc/services.d/*/run
|
||||
if [ -d /var/run/s6/container_environment ]; then printf "%s" "$LOCATION" > /var/run/s6/container_environment/HOME; fi
|
||||
if [ -d /var/run/s6/container_environment ]; then printf "%s" "$LOCATION" > /var/run/s6/container_environment/FM_HOME; fi
|
||||
printf "%s" "HOME=\"$LOCATION\"" >> ~/.bashrc
|
||||
@@ -51,3 +51,14 @@ mkdir -p "$LOCATION"
|
||||
# Set ownership
|
||||
bashio::log.info "Setting ownership to $PUID:$PGID"
|
||||
chown "$PUID":"$PGID" "$LOCATION"
|
||||
|
||||
####################
|
||||
# Migrate database #
|
||||
####################
|
||||
|
||||
if [ -d /homeassistant/addons_config/calibre-web ]; then
|
||||
echo "Moving database to new location /config"
|
||||
cp -rf /homeassistant/addons_config/calibre-web/* "$LOCATION"/
|
||||
rm -r /homeassistant/addons_config/calibre-web
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -d /config/addons_config/calibre-web ]; then
|
||||
echo "Creating /config/addons_config/calibre-web"
|
||||
mkdir -p /config/addons_config/calibre-web
|
||||
if [ ! -d /config ]; then
|
||||
echo "Creating /config"
|
||||
mkdir -p /config
|
||||
fi
|
||||
|
||||
chown -R "$PUID:$PGID" /config/addons_config/calibre-web
|
||||
chown -R "$PUID:$PGID" /config
|
||||
|
||||
@@ -14,10 +14,10 @@ bashio::log.info "Install libnss3"
|
||||
apt-get update && apt-get install libnss3 &>/dev/null
|
||||
|
||||
# Set Ingress login
|
||||
if [ ! -f /config/addons_config/calibre-web/app.db ]; then
|
||||
if [ ! -f /config/app.db ]; then
|
||||
bashio::log.warning "First boot : disabling Ingress until addon restart"
|
||||
else
|
||||
sqlite3 /config/addons_config/calibre-web/app.db 'update settings set config_reverse_proxy_login_header_name="X-WebAuth-User",config_allow_reverse_proxy_header_login=1'
|
||||
sqlite3 /config/app.db 'update settings set config_reverse_proxy_login_header_name="X-WebAuth-User",config_allow_reverse_proxy_header_login=1'
|
||||
fi
|
||||
|
||||
bashio::log.info "Default username:password is admin:admin123"
|
||||
|
||||
Reference in New Issue
Block a user