mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +00:00
devenv
This commit is contained in:
parent
d7b12ddc98
commit
f63db3c2f0
2 changed files with 5 additions and 7 deletions
|
@ -4,7 +4,6 @@
|
|||
# Home Assistant Community Add-on: Studio Code Server
|
||||
# Runs the code-server
|
||||
# ==============================================================================
|
||||
|
||||
bashio::log.info 'Starting code-server...'
|
||||
|
||||
# Export env variables for the Home Assistant extension
|
||||
|
@ -12,4 +11,4 @@ export HASS_SERVER="http://supervisor/core"
|
|||
export HASS_TOKEN="${SUPERVISOR_TOKEN:-}"
|
||||
|
||||
# Run the code server
|
||||
exec code-server /config
|
||||
exec code-server /SERVER
|
||||
|
|
|
@ -24,7 +24,7 @@ readonly -a PREVIOUS_DEFAULT_CONFIG_HASHES=(
|
|||
)
|
||||
|
||||
readonly DEFAULT_FILES_PATH="/var/lib/code-server/defaults"
|
||||
readonly DEFAULT_CONFIG_PATH="/config/addon_configs/vscode"
|
||||
readonly DEFAULT_CONFIG_PATH="/SERVER/config/addon_configs/vscode"
|
||||
readonly CODE_SERVER_CONFIG_DIR="/root/.config/code-server/"
|
||||
readonly CODE_SERVER_CONFIG="$DEFAULT_CONFIG_PATH/config.yaml"
|
||||
readonly CODE_SERVER_EXTENSIONS_LIST="$DEFAULT_CONFIG_PATH/vscode.extensions"
|
||||
|
@ -52,7 +52,6 @@ if [ ! -e "$CODE_SERVER_CONFIG" ]; then
|
|||
bashio::log.error "CODE_SERVER_CONFIG does not exist.."
|
||||
cp "$DEFAULT_FILES_PATH/config.yaml" "$CODE_SERVER_CONFIG"
|
||||
|
||||
|
||||
fi
|
||||
|
||||
# Set a link to where code-server expects the config to be
|
||||
|
@ -70,13 +69,13 @@ fi
|
|||
|
||||
if bashio::config.has_value 'log_level'; then
|
||||
log_level=$(bashio::config 'log_level')
|
||||
if [ "$log_level" = "warning" ] ; then
|
||||
if [ "$log_level" = "warning" ]; then
|
||||
log_level="warn"
|
||||
fi
|
||||
if [ "$log_level" = "notice" ] ; then
|
||||
if [ "$log_level" = "notice" ]; then
|
||||
log_level="warn"
|
||||
fi
|
||||
if [ "$log_level" = "fatal" ] ; then
|
||||
if [ "$log_level" = "fatal" ]; then
|
||||
log_level="error"
|
||||
fi
|
||||
sed -i "/log=/c log=\"$log_level\"" "$CODE_SERVER_CONFIG"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue