From 783b5e7d9fcf4c2144b2639c48606e89ab689a0e Mon Sep 17 00:00:00 2001 From: Timmo Date: Tue, 19 Mar 2019 19:51:35 +0000 Subject: [PATCH] :hammer: Use new ssl checks --- .../rootfs/etc/cont-init.d/10-requirements.sh | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/home-panel/rootfs/etc/cont-init.d/10-requirements.sh b/home-panel/rootfs/etc/cont-init.d/10-requirements.sh index 0a18665..f2cf874 100644 --- a/home-panel/rootfs/etc/cont-init.d/10-requirements.sh +++ b/home-panel/rootfs/etc/cont-init.d/10-requirements.sh @@ -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'