mirror of
https://github.com/hassio-addons/addon-home-panel.git
synced 2025-05-04 19:01:21 +00:00
🔨 Use new ssl checks
This commit is contained in:
parent
a6dfb6b231
commit
783b5e7d9f
1 changed files with 2 additions and 18 deletions
|
@ -3,24 +3,8 @@
|
|||
# Community Hass.io Add-ons: Home Panel
|
||||
# This checks if all user configuration requirements are met
|
||||
# ==============================================================================
|
||||
# Check SSL requirements, if enabled
|
||||
if bashio::config.true 'ssl'; then
|
||||
if ! bashio::config.has_value 'certfile'; then
|
||||
bashio::exit.nok 'SSL is enabled, but no certfile was specified'
|
||||
fi
|
||||
|
||||
if ! bashio::config.has_value 'keyfile'; then
|
||||
bashio::exit.nok 'SSL is enabled, but no keyfile was specified'
|
||||
fi
|
||||
|
||||
if ! bashio::fs.file_exists "/ssl/$(bashio::config 'certfile')"; then
|
||||
bashio::exit.nok 'The configured certfile is not found'
|
||||
fi
|
||||
|
||||
if ! bashio::fs.file_exists "/ssl/$(bashio::config 'keyfile')"; then
|
||||
bashio::exit.nok 'The configured keyfile is not found'
|
||||
fi
|
||||
fi
|
||||
# Check SSL settings
|
||||
bashio::config.require.ssl
|
||||
|
||||
if ! bashio::config.has_value 'config_file'; then
|
||||
bashio::exit.nok 'No config file was specified'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue