mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-07 08:05:57 +02:00
Fix data migration ordering
This commit is contained in:
@@ -18,7 +18,6 @@ LEGACY1="/config/birdnet-pipy/data"
|
|||||||
LEGACY2="/data"
|
LEGACY2="/data"
|
||||||
|
|
||||||
mkdir -p "${DATA_LOCATION}"
|
mkdir -p "${DATA_LOCATION}"
|
||||||
mkdir -p "${DATA_LOCATION}/config" "${DATA_LOCATION}/clips" "${DATA_LOCATION}/logs" "${DATA_LOCATION}/cache" || true
|
|
||||||
|
|
||||||
if [ -z "$(ls -A "${DATA_LOCATION}" 2>/dev/null || true)" ]; then
|
if [ -z "$(ls -A "${DATA_LOCATION}" 2>/dev/null || true)" ]; then
|
||||||
if [ -d "${LEGACY1}" ] && [ -n "$(ls -A "${LEGACY1}" 2>/dev/null || true)" ]; then
|
if [ -d "${LEGACY1}" ] && [ -n "$(ls -A "${LEGACY1}" 2>/dev/null || true)" ]; then
|
||||||
@@ -30,6 +29,8 @@ if [ -z "$(ls -A "${DATA_LOCATION}" 2>/dev/null || true)" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p "${DATA_LOCATION}/config" "${DATA_LOCATION}/clips" "${DATA_LOCATION}/logs" "${DATA_LOCATION}/cache" || true
|
||||||
|
|
||||||
rm -rf /app/data
|
rm -rf /app/data
|
||||||
ln -s "${DATA_LOCATION}" /app/data
|
ln -s "${DATA_LOCATION}" /app/data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user