mirror of
https://github.com/hassio-addons/addon-home-panel.git
synced 2025-05-04 19:01:21 +00:00
19 lines
724 B
Bash
19 lines
724 B
Bash
#!/usr/bin/with-contenv bash
|
|
# ==============================================================================
|
|
# Community Hass.io Add-ons: Home Panel
|
|
# This copies the configs to their respective locations
|
|
# ==============================================================================
|
|
# shellcheck disable=SC1091
|
|
source /usr/lib/hassio-addons/base.sh
|
|
|
|
config_file="/config/$(hass.config.get 'config_file')"
|
|
|
|
if [ ! -f "$config_file" ]; then
|
|
hass.log.info "Config file does not exist. Creating.."
|
|
cp /etc/home-panel/home-panel-config.default.json "$config_file"
|
|
hass.log.info "You should now edit this file, then restart the addon."
|
|
fi
|
|
|
|
hass.log.info "Copy config.."
|
|
|
|
cp "$config_file" /usr/src/api/files/config.json
|