addon-vscode/vscode/rootfs/etc/s6-overlay/s6-rc.d/code-server/run
Richard Sperry cf37c9c8fd devenv
2025-04-16 21:17:45 -07:00

16 lines
655 B
Text

#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: Studio Code Server
# Runs the code-server
# ==============================================================================
bashio::log.info 'Starting code-server...'
source "../paths.sh"
# 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_WORKSPACE_DIR" || bashio::exit.nok "Workspace path does not exist"
exec code-server "$CODE_SERVER_WORKSPACE_FILE"