mirror of
https://github.com/hassio-addons/addon-glances.git
synced 2025-05-04 11:01:25 +00:00
Merge 2d30489a5c
into adcd904bd8
This commit is contained in:
commit
c1758be270
2 changed files with 10 additions and 1 deletions
|
@ -22,10 +22,11 @@ ports_description:
|
|||
map:
|
||||
- addons
|
||||
- backup
|
||||
- config:rw
|
||||
- addon_config:rw
|
||||
- share
|
||||
- ssl
|
||||
- media
|
||||
- homeassistant_config:rw # to enable migration to addon_config
|
||||
hassio_api: true
|
||||
auth_api: true
|
||||
docker_api: true
|
||||
|
|
|
@ -6,6 +6,14 @@
|
|||
declare protocol
|
||||
bashio::require.unprotected
|
||||
|
||||
# Migrate add-on data from the Home Assistant config directory,
|
||||
# to the add-on configuration directory.
|
||||
if ! bashio::fs.file_exists '/config/glances/glances.conf' \
|
||||
&& bashio::fs.file_exists '/homeassistant/glances/glances.conf'; then
|
||||
mv /homeassistant/glances /config/ \
|
||||
|| bashio::exit.nok "Failed to migrate Glances configuration out of Home Assistant config directory"
|
||||
fi
|
||||
|
||||
# Ensure the configuration exists
|
||||
if bashio::fs.file_exists '/config/glances/glances.conf'; then
|
||||
cp -f /config/glances/glances.conf /etc/glances.conf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue