mirror of
https://github.com/hassio-addons/addon-home-panel.git
synced 2025-05-04 19:01:21 +00:00
16 lines
594 B
Text
16 lines
594 B
Text
#!/usr/bin/with-contenv bash
|
|
# ==============================================================================
|
|
# Community Hass.io Add-ons: Home Panel
|
|
# Keeps the config file up to date
|
|
# ==============================================================================
|
|
# shellcheck disable=SC1091
|
|
source /usr/lib/hassio-addons/base.sh
|
|
|
|
config_file="/config/$(hass.config.get 'config_file')"
|
|
|
|
# shellcheck disable=SC2162
|
|
# shellcheck disable=SC2034
|
|
inotifywait -m "$config_file" | while read file; do \
|
|
hass.log.debug "Update Config.." \
|
|
&& cp "$config_file" /usr/src/api/files/config.json; \
|
|
done
|