Merge branch 'alexbelgium:master' into baldarn

This commit is contained in:
lorenzo farnararo
2024-01-04 17:29:20 +01:00
committed by GitHub
9 changed files with 32 additions and 12 deletions

View File

@@ -16,6 +16,11 @@ mapfile -t arr < <(jq -r 'keys[]' "${JSONSOURCE}")
for KEYS in "${arr[@]}"; do for KEYS in "${arr[@]}"; do
# export key # export key
VALUE=$(jq ."$KEYS" "${JSONSOURCE}") VALUE=$(jq ."$KEYS" "${JSONSOURCE}")
# Check if the value is an array
if [[ "$VALUE" == \[* ]]; then
bashio::log.warning "$VALUE is an array, skipping"
else
# Continue for single values
VALUE="${VALUE//[\"\']/}" VALUE="${VALUE//[\"\']/}"
line="${KEYS}='${VALUE}'" line="${KEYS}='${VALUE}'"
# Check if secret # Check if secret
@@ -59,7 +64,7 @@ for KEYS in "${arr[@]}"; do
# For s6 # For s6
if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi
echo "export ${KEYS}='${VALUE}'" >> ~/.bashrc echo "export ${KEYS}='${VALUE}'" >> ~/.bashrc
fi
done done
################ ################

View File

@@ -1,3 +1,4 @@
- ⚠ MAJOR CHANGE : switch to the new config logic from homeassistant. Your configuration files will have migrated from /config/hassio_addons/calibre to a folder only accessible from my Filebrowser addon called /addon_configs/something-calibre. 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/1154
## 7.2.0 (16-12-2023) ## 7.2.0 (16-12-2023)
- Update to latest version from linuxserver/docker-calibre - Update to latest version from linuxserver/docker-calibre

View File

@@ -34,12 +34,12 @@ VOLUME [ "/sys/fs/cgroup" ]
# hadolint ignore=SC2015,DL4006,SC2013,SC2086 # hadolint ignore=SC2015,DL4006,SC2013,SC2086
RUN \ RUN \
# Change home folder location # Change home folder location
usermod --home /config/addons_config/calibre abc \ usermod --home /config abc \
&& mkdir -p /opt/calibre && mkdir -p /opt/calibre
# Global LSIO modifications # Global LSIO modifications
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh"
ARG CONFIGLOCATION="/config/addons_config/calibre" ARG CONFIGLOCATION="/config"
RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh
################## ##################

View File

@@ -57,9 +57,9 @@
"/dev/nvme2" "/dev/nvme2"
], ],
"environment": { "environment": {
"CALIBRE_CONFIG_DIRECTORY": "/config/addons_config/calibre", "CALIBRE_CONFIG_DIRECTORY": "/config",
"FM_HOME": "/config/addons_config/calibre", "FM_HOME": "/config",
"HOME": "/config/addons_config/calibre", "HOME": "/config",
"PGID": "0", "PGID": "0",
"PUID": "0", "PUID": "0",
"START_DOCKER": "false", "START_DOCKER": "false",
@@ -71,7 +71,8 @@
"map": [ "map": [
"media:rw", "media:rw",
"share:rw", "share:rw",
"config:rw", "addon_config:rw",
"homeassistant_config:rw",
"ssl" "ssl"
], ],
"name": "Calibre", "name": "Calibre",

View File

@@ -0,0 +1,13 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
####################
# Migrate database #
####################
if [ -f /homeassistant/addons_config/calibre ]; then
echo "Moving database to new location /config"
cp -rnf /homeassistant/addons_config/calibre/* /config/
rm -r /homeassistant/addons_config/calibre
fi

View File

@@ -12,7 +12,7 @@ LOCATION=$(bashio::config 'data_location')
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then
# Default location # Default location
LOCATION="/config/addons_config/calibre" LOCATION="/config"
else 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" bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
@@ -25,7 +25,7 @@ else
done done
if [ -z "$LOCATIONOK" ]; then if [ -z "$LOCATIONOK" ]; then
LOCATION="/config/addons_config/calibre" 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" 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 fi
@@ -45,7 +45,7 @@ done
# Correct home location # Correct home location
for folders in /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d; do for folders in /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d; do
if [ -d "$folders" ]; then if [ -d "$folders" ]; then
sed -i "s|/config/addons_config/calibre|$LOCATION|g" $(find "$folders" -type f) &>/dev/null || true sed -i "s|/config|$LOCATION|g" $(find "$folders" -type f) &>/dev/null || true
fi fi
done done

View File

@@ -108,5 +108,5 @@
"slug": "inadyn", "slug": "inadyn",
"udev": true, "udev": true,
"url": "https://github.com/alexbelgium/hassio-addons", "url": "https://github.com/alexbelgium/hassio-addons",
"version": "2.12.0" "version": "2.12.0-2"
} }

View File

@@ -1,3 +1,4 @@
## &#9888; Open Request : [✨ [REQUEST] Jellyfin discord bot (opened 2023-08-17)](https://github.com/alexbelgium/hassio-addons/issues/943) by [@matsob0123](https://github.com/matsob0123)
## &#9888; Open Request : [✨ [REQUEST] Jellyfish NAS: omit `/config/addons_config/jellyfin/data/metadata` from backup (opened 2023-10-25)](https://github.com/alexbelgium/hassio-addons/issues/1048) by [@bilogic](https://github.com/bilogic) ## &#9888; Open Request : [✨ [REQUEST] Jellyfish NAS: omit `/config/addons_config/jellyfin/data/metadata` from backup (opened 2023-10-25)](https://github.com/alexbelgium/hassio-addons/issues/1048) by [@bilogic](https://github.com/bilogic)
# Home assistant add-on: jellyfin # Home assistant add-on: jellyfin

View File

@@ -1,4 +1,3 @@
## &#9888; Open Issue : [🐛 [qbittorrent] Unable to get qbitmanage to run (opened 2023-12-13)](https://github.com/alexbelgium/hassio-addons/issues/1131) by [@hacshacdgacs](https://github.com/hacshacdgacs)
## &#9888; Open Issue : [🐛 [Qbittorrent] Unable to connect to Qbittorrent from Sonarr or Prowlarr (opened 2024-01-02)](https://github.com/alexbelgium/hassio-addons/issues/1153) by [@JohnnyPicnic](https://github.com/JohnnyPicnic) ## &#9888; Open Issue : [🐛 [Qbittorrent] Unable to connect to Qbittorrent from Sonarr or Prowlarr (opened 2024-01-02)](https://github.com/alexbelgium/hassio-addons/issues/1153) by [@JohnnyPicnic](https://github.com/JohnnyPicnic)
# Home assistant add-on: qbittorrent # Home assistant add-on: qbittorrent