mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +00:00
changed code-server config
This commit is contained in:
parent
042804e69e
commit
1f73553d54
3 changed files with 2 additions and 17 deletions
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue