addon-home-panel/home-panel/rootfs/etc/cont-init.d/10-config.sh
2018-08-18 14:53:23 +01:00

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