#!/usr/bin/with-contenv bashio # ============================================================================== # Community Hass.io Add-ons: Visual Studio Code # Runs the code server # ============================================================================== declare -a options bashio::log.info 'Starting the code server...' options+=(--port 8443) options+=(--user-data-dir "/data/vscode") options+=(--extensions-dir "/data/vscode/extensions") options+=(--host 127.0.0.1) options+=(--allow-http) # Disable code authentication, we use HA authentication options+=(--no-auth) # Export env variables for the Home Assistant extension export HASS_SERVER="http://hassio/homeassistant" export HASS_TOKEN="${HASSIO_TOKEN:-}" # Run the code server exec code-server "${options[@]}" /config