👕 Codestyling improvements

This commit is contained in:
Franck Nijhof 2019-01-11 22:13:11 +01:00
parent 2c11e64f3a
commit 39ca305850
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

View file

@ -6,10 +6,12 @@
# shellcheck disable=SC1091
source /usr/lib/hassio-addons/base.sh
declare config_file
config_file="/config/$(hass.config.get 'config_file')"
if [ ! -f "$config_file" ]; then
if ! hass.file_exists "${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 "Created. You should now edit this file at '$config_file'"
cp /etc/home-panel/home-panel-config.default.json "${config_file}"
hass.log.info "Created. You should now edit this file at '${config_file}'"
fi