mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-14 19:41:31 +02:00
Change DATA_DIR to '/config/data' and set permissions
Update data directory path and permissions in ha_entrypoint.sh
This commit is contained in:
@@ -23,9 +23,12 @@ fi
|
|||||||
# /opt/data is declared as a Docker VOLUME in the upstream image, which is NOT
|
# /opt/data is declared as a Docker VOLUME in the upstream image, which is NOT
|
||||||
# persistent across addon updates/reinstalls in HA.
|
# persistent across addon updates/reinstalls in HA.
|
||||||
# Redirect /opt/data → /config (persistent via addon_config:rw) with a symlink.
|
# Redirect /opt/data → /config (persistent via addon_config:rw) with a symlink.
|
||||||
DATA_DIR="/config"
|
DATA_DIR="/config/data"
|
||||||
echo "[Maintainerr] Setting up data directory: $DATA_DIR"
|
echo "[Maintainerr] Setting up data directory: $DATA_DIR"
|
||||||
mkdir -p "$DATA_DIR" "$DATA_DIR/logs"
|
mkdir -p "$DATA_DIR"
|
||||||
|
mkdir -p "$DATA_DIR"/logs
|
||||||
|
chmod -R 777 "$DATA_DIR"
|
||||||
|
chown -R node:node "$DATA_DIR"
|
||||||
|
|
||||||
# Preserve any seed data from the Docker volume before replacing it.
|
# Preserve any seed data from the Docker volume before replacing it.
|
||||||
# /opt/data is a Docker VOLUME mount and cannot be removed, so instead of
|
# /opt/data is a Docker VOLUME mount and cannot be removed, so instead of
|
||||||
|
|||||||
Reference in New Issue
Block a user