changed dockerfile and init-cp run

This commit is contained in:
Richard Sperry 2025-04-15 15:38:22 -07:00
parent 2b3e7447a0
commit 69f3b3cc23
2 changed files with 11 additions and 4 deletions

View file

@ -38,9 +38,9 @@ services:
- mysql:want - mysql:want
- mqtt:want - mqtt:want
options: options:
log_level: Warn log_level: warn
schema: schema:
log_level: list(trace|debug|info|Warn|error) log_level: list(trace|debug|info|notice|warning|error|fatal)?
config_path: str? config_path: str?
packages: packages:
- str? - str?

View file

@ -53,8 +53,15 @@ fi
if bashio::config.has_value 'log_level'; then if bashio::config.has_value 'log_level'; then
log_level=$(bashio::config 'log_level') log_level=$(bashio::config 'log_level')
# shellcheck disable=SC2001 if [ "$log_level" = "warning" ] ; then
log_level="$(echo "$log_level" | sed 's/.*/\u&/')" log_level="warn"
fi
if [ "$log_level" = "notice" ] ; then
log_level="warn"
fi
if [ "$log_level" = "fatal" ] ; then
log_level="error"
fi
sed -i "/log=/c log=\"$log_level\"" "$CODE_SERVER_CONFIG" sed -i "/log=/c log=\"$log_level\"" "$CODE_SERVER_CONFIG"
fi fi