Migrate *arr addons to addon_configs

This commit is contained in:
Alexandre
2026-01-08 13:30:21 +01:00
parent 1f1bd9610c
commit 3979acc25f
32 changed files with 107 additions and 108 deletions

View File

@@ -1,4 +1,6 @@
#!/bin/bash
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
if [ ! -d /share/storage/tv ]; then
echo "Creating /share/storage/tv"
@@ -12,16 +14,10 @@ if [ ! -d /share/downloads ]; then
chown -R "$PUID:$PGID" /share/downloads
fi
if [ -d /config/sonarr ] && [ ! -d /config/addons_config/sonarr ]; then
echo "Moving to new location /config/addons_config/sonarr"
mkdir -p /config/addons_config/sonarr
chown -R "$PUID:$PGID" /config/addons_config/sonarr
mv /config/sonarr/* /config/addons_config/sonarr/
rm -r /config/sonarr
fi
slug=sonarr
if [ ! -d /config/addons_config/sonarr ]; then
echo "Creating /config/addons_config/sonarr"
mkdir -p /config/addons_config/sonarr
chown -R "$PUID:$PGID" /config/addons_config/sonarr
if [ -d "/homeassistant/addons_config/$slug" ]; then
echo "Migrating /homeassistant/addons_config/$slug to /addon_configs/xxx-$slug"
cp -rnf /homeassistant/addons_config/"$slug"/* /config/ || true
mv /homeassistant/addons_config/"$slug" /homeassistant/addons_config/"$slug"_migrated
fi

View File

@@ -21,7 +21,7 @@ sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/servers/ingress.conf
# Values
slug=sonarr
CONFIG_LOCATION=/config/addons_config/"$slug"/config.xml
CONFIG_LOCATION=/config/config.xml
if [ -f "$CONFIG_LOCATION" ]; then

View File

@@ -6,7 +6,7 @@ set -e
# Set variables
slug=sonarr
port=8989
CONFIG_LOCATION=/config/addons_config/"$slug"/config.xml
CONFIG_LOCATION=/config/config.xml
# Wait for transmission to become available
bashio::net.wait_for "$port" localhost 900