mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 23:18:10 +01:00
Migrate dashboard json files to /data folder instead of wiping out (#5441)
This commit is contained in:
parent
dae8ab563c
commit
b5b654e054
1 changed files with 6 additions and 1 deletions
|
@ -42,7 +42,12 @@ fi
|
||||||
mkdir -p "${pio_cache_base}"
|
mkdir -p "${pio_cache_base}"
|
||||||
|
|
||||||
if bashio::fs.directory_exists '/config/esphome/.esphome'; then
|
if bashio::fs.directory_exists '/config/esphome/.esphome'; then
|
||||||
bashio::log.info "Removing old .esphome directory..."
|
bashio::log.info "Migrating old .esphome directory..."
|
||||||
|
if bashio::fs.file_exists '/config/esphome/.esphome/esphome.json'; then
|
||||||
|
mv /config/esphome/.esphome/esphome.json /data/esphome.json
|
||||||
|
fi
|
||||||
|
mkdir -p "/data/storage"
|
||||||
|
mv /config/esphome/.esphome/*.json /data/storage/ || true
|
||||||
rm -rf /config/esphome/.esphome
|
rm -rf /config/esphome/.esphome
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue