changed code-server config

This commit is contained in:
Richard Sperry 2025-04-14 01:00:19 -07:00
parent 042804e69e
commit 1f73553d54
3 changed files with 2 additions and 17 deletions

View file

@ -9,25 +9,10 @@ declare config_path
bashio::log.info 'Starting code-server...'
options+=()
# options+=(--user-data-dir="$CODE_SERVER_CONFIG_PATH/User")
# options+=(--extensions-dir="$CODE_SERVER_CONFIG_PATH/extensions")
# options+=(--disable-telemetry)
# options+=(--disable-update-check)
# options+=(--disable-getting-started-override)
# options+=(--auth none)
config
# Disable code authentication, we use HA authentication
options+=(--disable-workspace-trust)
# Export env variables for the Home Assistant extension
export HASS_SERVER="http://supervisor/core"
export HASS_TOKEN="${SUPERVISOR_TOKEN:-}"
# Run the code server
cd "${CODE_SERVER_CONFIG_PATH}" || bashio::exit.nok "Could not change working directory"
exec code-server "/config"

View file

@ -30,7 +30,7 @@ readonly CODE_SERVER_CONFIG="/root/.config/code-server/config.yaml"
# Ensure config path exists
if [ bashio::config.has_value "config_path" ]; then
config_path=$(bashio::config "config_path")
config_path=$(bashio::config 'config_path')
if ! bashio::fs.directory_exists "${config_path}"; then
bashio::exit.nok "Configured config path does not exists"
fi

View file

@ -21,7 +21,7 @@ if bashio::services.available "mqtt"; then
echo "--pw ${password}"
echo "--port ${port}"
echo "--username ${username}"
} > /root/.config/mosquitto_sub
} >/root/.config/mosquitto_sub
ln -s /root/.config/mosquitto_sub /root/.config/mosquitto_pub
ln -s /root/.config/mosquitto_sub /root/.config/mosquitto_rr