mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-24 09:41:50 +02:00
Use CONFIG_LOCATION only for migration
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
|
||||
## 12.0.17-1 (09-01-2026)
|
||||
- ⚠ MAJOR CHANGE : switch to the new config logic from homeassistant. Your configuration files will have migrated from /config/addons_config/seafile to a folder only accessible from my Filebrowser addon called /addon_configs/xxx-seafile. Please make a backup before updating.
|
||||
|
||||
## 12.0.17 (12-03-2026)
|
||||
- Ensure `SERVICE_URL` and `FILE_SERVER_ROOT` are written to the active Seafile config path.
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ Webui can be found at <http://homeassistant:8000> (Seahub) and <http://homeassis
|
||||
| `url` | str | | External URL for Seafile |
|
||||
| `database` | list | `sqlite` | Database type (sqlite/mariadb_addon) |
|
||||
| `data_location` | str | `/share/seafile` | Data storage location |
|
||||
| `CONFIG_LOCATION` | str | | Custom config file location |
|
||||
| `CONFIG_LOCATION` | str | `/addon_configs/xxx-seafile/config.yaml` | Custom config file location |
|
||||
| `localdisks` | str | | Local drives to mount (e.g., `sda1,sdb1`) |
|
||||
| `networkdisks` | str | | SMB shares to mount (e.g., `//SERVER/SHARE`) |
|
||||
| `cifsusername` | str | | SMB username for network shares |
|
||||
@@ -128,4 +128,3 @@ Create an issue on github
|
||||
|
||||
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||
|
||||
|
||||
|
||||
@@ -72,13 +72,14 @@ environment:
|
||||
PUID: "1000"
|
||||
image: ghcr.io/alexbelgium/seafile-{arch}
|
||||
map:
|
||||
- config:rw
|
||||
- addon_config:rw
|
||||
- homeassistant_config:rw
|
||||
- share:rw
|
||||
- ssl
|
||||
name: Seafile
|
||||
options:
|
||||
env_vars: []
|
||||
CONFIG_LOCATION: /config/addons_config/seafile/config.yaml
|
||||
CONFIG_LOCATION: /config/config.yaml
|
||||
FILE_SERVER_ROOT: http://homeassistant.local:8082
|
||||
PGID: 1000
|
||||
PORT: "8082"
|
||||
@@ -128,5 +129,5 @@ services:
|
||||
slug: seafile
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/seafile
|
||||
version: "12.0.17"
|
||||
version: "12.0.17-1"
|
||||
webui: http://[HOST]:[PORT:8000]
|
||||
|
||||
21
seafile/rootfs/etc/cont-init.d/00-migrate.sh
Executable file
21
seafile/rootfs/etc/cont-init.d/00-migrate.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
slug=seafile
|
||||
legacy_path="/homeassistant/addons_config/$slug"
|
||||
target_path="/config"
|
||||
|
||||
mkdir -p "$target_path"
|
||||
|
||||
if bashio::config.has_value 'CONFIG_LOCATION' && [ "$(bashio::config 'CONFIG_LOCATION')" != "/config" ]; then
|
||||
legacy_path="$(bashio::config 'CONFIG_LOCATION')"
|
||||
fi
|
||||
|
||||
if [ -d "$legacy_path" ]; then
|
||||
if [ ! -f "$legacy_path/.migrated" ] || [ -z "$(ls -A "$target_path" 2>/dev/null)" ]; then
|
||||
echo "Migrating $legacy_path to $target_path"
|
||||
cp -rnf "$legacy_path"/. "$target_path"/ || true
|
||||
touch "$legacy_path/.migrated"
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user