🔨 fix names and add requirements

This commit is contained in:
Timmo 2018-08-19 12:34:18 +01:00
parent 11c64b1232
commit aecf85025a
10 changed files with 43 additions and 9 deletions

View file

@ -0,0 +1,34 @@
#!/usr/bin/with-contenv bash
# ==============================================================================
# Timmo Hass.io Add-ons: Home Panel
# This checks if all user configuration requirements are met
# ==============================================================================
# shellcheck disable=SC1091
source /usr/lib/hassio-addons/base.sh
# Check SSL requirements, if enabled
if hass.config.true 'ssl'; then
if ! hass.config.has_value 'certfile'; then
hass.die 'SSL is enabled, but no certfile was specified'
fi
if ! hass.config.has_value 'keyfile'; then
hass.die 'SSL is enabled, but no keyfile was specified'
fi
if ! hass.file_exists "/ssl/$(hass.config.get 'certfile')"; then
hass.die 'The configured certfile is not found'
fi
if ! hass.file_exists "/ssl/$(hass.config.get 'keyfile')"; then
hass.die 'The configured keyfile is not found'
fi
fi
if ! hass.config.has_value 'config_file'; then
hass.die 'No config file was specified'
fi
if ! hass.file_exists "/config/$(hass.config.get 'config_file')"; then
hass.die 'No config file was specified'
fi

View file

@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Timmo Hass.io Add-ons: Home Panel
# This copies the configs to their respective locations
# ==============================================================================
# shellcheck disable=SC1091

View file

@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Timmo Hass.io Add-ons: Home Panel
# This copies the nginx configs to their respective locations
# ==============================================================================
# shellcheck disable=SC1091

View file

@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Timmo Hass.io Add-ons: Home Panel
# This copies the api files to their respective locations
# ==============================================================================
# shellcheck disable=SC1091

View file

@ -1,6 +1,6 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Timmo Hass.io Add-ons: Home Panel
# Take down the S6 supervision tree when Home Panel fails
# ==============================================================================
if -n { s6-test $# -ne 0 }

View file

@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Timmo Hass.io Add-ons: Home Panel
# Starts server to serve the api
# ==============================================================================
# shellcheck disable=SC1091

View file

@ -1,6 +1,6 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Timmo Hass.io Add-ons: Home Panel
# Take down the S6 supervision tree when Home Panel fails
# ==============================================================================
if -n { s6-test $# -ne 0 }

View file

@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Timmo Hass.io Add-ons: Home Panel
# Keeps the config file up to date
# ==============================================================================
# shellcheck disable=SC1091

View file

@ -1,6 +1,6 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Timmo Hass.io Add-ons: Home Panel
# Take down the S6 supervision tree when Home Panel fails
# ==============================================================================
if -n { s6-test $# -ne 0 }

View file

@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Timmo Hass.io Add-ons: Home Panel
# Starts server to serve the webapp
# ==============================================================================
# shellcheck disable=SC1091