mirror of
https://github.com/hassio-addons/addon-home-panel.git
synced 2025-05-05 19:31:23 +00:00
🔨 fix names and add requirements
This commit is contained in:
parent
11c64b1232
commit
aecf85025a
10 changed files with 43 additions and 9 deletions
34
home-panel/rootfs/etc/cont-init.d/10-requirements.sh
Normal file
34
home-panel/rootfs/etc/cont-init.d/10-requirements.sh
Normal 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
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/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
|
# This copies the configs to their respective locations
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/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
|
# This copies the nginx configs to their respective locations
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/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
|
# This copies the api files to their respective locations
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/execlineb -S0
|
#!/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
|
# Take down the S6 supervision tree when Home Panel fails
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
if -n { s6-test $# -ne 0 }
|
if -n { s6-test $# -ne 0 }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/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
|
# Starts server to serve the api
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/execlineb -S0
|
#!/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
|
# Take down the S6 supervision tree when Home Panel fails
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
if -n { s6-test $# -ne 0 }
|
if -n { s6-test $# -ne 0 }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/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
|
# Keeps the config file up to date
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/execlineb -S0
|
#!/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
|
# Take down the S6 supervision tree when Home Panel fails
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
if -n { s6-test $# -ne 0 }
|
if -n { s6-test $# -ne 0 }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/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
|
# Starts server to serve the webapp
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue