mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +00:00
changed dockerfile and init-cp run
This commit is contained in:
parent
2b3e7447a0
commit
69f3b3cc23
2 changed files with 11 additions and 4 deletions
|
@ -38,9 +38,9 @@ services:
|
|||
- mysql:want
|
||||
- mqtt:want
|
||||
options:
|
||||
log_level: Warn
|
||||
log_level: warn
|
||||
schema:
|
||||
log_level: list(trace|debug|info|Warn|error)
|
||||
log_level: list(trace|debug|info|notice|warning|error|fatal)?
|
||||
config_path: str?
|
||||
packages:
|
||||
- str?
|
||||
|
|
|
@ -53,8 +53,15 @@ fi
|
|||
|
||||
if bashio::config.has_value 'log_level'; then
|
||||
log_level=$(bashio::config 'log_level')
|
||||
# shellcheck disable=SC2001
|
||||
log_level="$(echo "$log_level" | sed 's/.*/\u&/')"
|
||||
if [ "$log_level" = "warning" ] ; then
|
||||
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"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue