This commit is contained in:
Richard Sperry 2025-04-16 22:43:24 -07:00
parent 6c91d6d9d2
commit b30873fae2
3 changed files with 10 additions and 9 deletions

View file

@ -5,11 +5,11 @@
# Runs the code-server # Runs the code-server
# ============================================================================== # ==============================================================================
bashio::log.info 'Starting code-server...' bashio::log.info 'Starting code-server...'
parent_dir=$(dirname "$(readlink -f "$0")"
echo "$parent_dir" caller_dir=$(dirname "$(readlink -f "$0")")
)
# shellcheck source=../paths.sh # shellcheck source=../paths.sh
source "$parent_dir/paths.sh" source "../$caller_dir/paths.sh"
# Export env variables for the Home Assistant extension # Export env variables for the Home Assistant extension
export HASS_SERVER="http://supervisor/core" export HASS_SERVER="http://supervisor/core"
export HASS_TOKEN="${SUPERVISOR_TOKEN:-}" export HASS_TOKEN="${SUPERVISOR_TOKEN:-}"

View file

@ -22,9 +22,10 @@ readonly -a PREVIOUS_DEFAULT_CONFIG_HASHES=(
dbe905f0935b2fea8bb5ba379bff78db9d056ea6d0965c68aa9b07938a52cbbf117186452b2b6c766aa4cf93cc3494ad91b763e8500e515e41d8cde31a3821ae dbe905f0935b2fea8bb5ba379bff78db9d056ea6d0965c68aa9b07938a52cbbf117186452b2b6c766aa4cf93cc3494ad91b763e8500e515e41d8cde31a3821ae
2212babaa9dc46d38ba239052c9c05151abe517cc8b493d0d351a96bf70c1efa4f7479f6ed0b75811429ba649906eb5657d73b0732b460e718a5c66603dcdbda 2212babaa9dc46d38ba239052c9c05151abe517cc8b493d0d351a96bf70c1efa4f7479f6ed0b75811429ba649906eb5657d73b0732b460e718a5c66603dcdbda
) )
parent_dir=$(dirname "$(readlink -f "$0")") caller_dir=$(dirname "$(readlink -f "$0")")
# shellcheck source=../paths.sh # shellcheck source=../paths.sh
source "$parent_dir/paths.sh" source "../$caller_dir/paths.sh"
CODE_SERVER_CONFIG="$DEFAULT_CONFIG_PATH/config.yaml" CODE_SERVER_CONFIG="$DEFAULT_CONFIG_PATH/config.yaml"
run() { run() {

View file

@ -6,10 +6,10 @@
# ============================================================================== # ==============================================================================
bashio::log.info "Initalizing code-server configs" bashio::log.info "Initalizing code-server configs"
parent_dir=$(dirname "$(readlink -f "$0")") caller_dir=$(dirname "$(readlink -f "$0")")
echo "$parent_dir"
# shellcheck source=../paths.sh # shellcheck source=../paths.sh
source "$parent_dir/paths.sh" source "../$caller_dir/paths.sh"
# List of previous config hashes, to allow upgrade "default" configs. # List of previous config hashes, to allow upgrade "default" configs.
readonly CUSTOM_BASH_SCRIPTS_PATH="/data/custom" readonly CUSTOM_BASH_SCRIPTS_PATH="/data/custom"
readonly DEFAULT_FILES_PATH="/var/lib/code-server/defaults/core" readonly DEFAULT_FILES_PATH="/var/lib/code-server/defaults/core"