Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
👕 Codestyling improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Jan 11, 2019
1 parent 2c11e64 commit 39ca305
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions home-panel/rootfs/etc/cont-init.d/20-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 39ca305

Please sign in to comment.