mirror of
https://github.com/hassio-addons/addon-glances.git
synced 2025-05-04 19:11:23 +00:00
Make it /config/glances
This commit is contained in:
parent
bf01cae649
commit
2d30489a5c
1 changed files with 2 additions and 5 deletions
|
@ -8,13 +8,10 @@ bashio::require.unprotected
|
||||||
|
|
||||||
# Migrate add-on data from the Home Assistant config directory,
|
# Migrate add-on data from the Home Assistant config directory,
|
||||||
# to the add-on configuration directory.
|
# to the add-on configuration directory.
|
||||||
if ! bashio::fs.file_exists '/config/glances.conf' \
|
if ! bashio::fs.file_exists '/config/glances/glances.conf' \
|
||||||
&& bashio::fs.file_exists '/homeassistant/glances/glances.conf'; then
|
&& bashio::fs.file_exists '/homeassistant/glances/glances.conf'; then
|
||||||
shopt -s dotglob
|
mv /homeassistant/glances /config/ \
|
||||||
mv /homeassistant/glances/* /config/ \
|
|
||||||
|| bashio::exit.nok "Failed to migrate Glances configuration out of Home Assistant config directory"
|
|| bashio::exit.nok "Failed to migrate Glances configuration out of Home Assistant config directory"
|
||||||
rmdir /homeassistant/glances \
|
|
||||||
|| bashio::log.warning "Failed to remove Glances configuration directory from Home Assistant config directory"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure the configuration exists
|
# Ensure the configuration exists
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue