Skip to content

Commit

Permalink
🎨 Improvements of handles for non editable values
Browse files Browse the repository at this point in the history
  • Loading branch information
casse-boubou committed Jun 16, 2024
1 parent 9fd30de commit 6a96029
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
29 changes: 29 additions & 0 deletions sharry/rootfs/etc/cont-init.d/30-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,35 @@ for var in $(bashio::config 'conf_overrides|keys'); do
bashio::log.fatal "matching this pattern and try again:"
bashio::log.fatal "'sharry.restserver.backend.files.*'"
bashio::log.fatal
bashio::log.fatal "And please use 'defaultStore' in module configuration instead"
bashio::log.fatal
bashio::exit.nok

elif [[ ${property} =~ ^sharry[.]restserver[.]base-url ]]; then
bashio::log.fatal
bashio::log.fatal "Your config attempts to override log level settings."
bashio::log.fatal "This is not allowed as it could break the addon."
bashio::log.fatal
bashio::log.fatal "Remove any conf_overrides you have added with a property"
bashio::log.fatal "matching this pattern:"
bashio::log.fatal "'sharry.restserver.base-url'"
bashio::log.fatal
bashio::log.fatal "And please use 'domain', 'use_ssl' and 'no_port_to_Base_URL'"
bashio::log.fatal "in module configuration instead"
bashio::log.fatal
bashio::exit.nok

elif [[ ${property} =~ ^sharry[.]restserver[.]logging[.]minimum-level ]]; then
bashio::log.fatal
bashio::log.fatal "Your config attempts to override log level settings."
bashio::log.fatal "This is not allowed as it could break the addon."
bashio::log.fatal
bashio::log.fatal "Remove any conf_overrides you have added with a property"
bashio::log.fatal "matching this pattern:"
bashio::log.fatal "'sharry.restserver.logging.minimum-level'"
bashio::log.fatal
bashio::log.fatal "And please use 'log_level' parameter in module configuration"
bashio::log.fatal
bashio::exit.nok

# Prevent break of Nginx reverse proxy
Expand Down
3 changes: 3 additions & 0 deletions sharry/rootfs/etc/sharry/sharry.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ sharry.restserver {

# Where the server binds to.
bind {
#### CANNOT OVERRIDE
address = "0.0.0.0"
#### CANNOT OVERRIDE
port = 9090
}

Expand Down Expand Up @@ -317,6 +319,7 @@ sharry.restserver {
}

# How files are stored.
#### CANNOT OVERRIDE
files {
# The id of an enabled store from the `stores` array that should
# be used.
Expand Down

0 comments on commit 6a96029

Please sign in to comment.