This commit is contained in:
Richard Sperry 2025-04-16 18:34:05 -07:00
parent e3c474d4b0
commit ce25e5eb60
2 changed files with 8 additions and 1 deletions

View file

@ -8,19 +8,20 @@ bashio::log.info "Initalizing code-server configs"
# List of previous config hashes, to allow upgrade "default" configs.
readonly CUSTOM_BASH_SCRIPTS_PATH="/data/vscode/custom"
readonly DEFAULT_FILES_PATH="/var/lib/code-server/defaults"
run() {
if [ ! -d "$CUSTOM_BASH_SCRIPTS_PATH" ]; then
bashio::log.warning "Config path did not exist, creating $CUSTOM_BASH_SCRIPTS_PATH"
mkdir -p "$CUSTOM_BASH_SCRIPTS_PATH" ||
bashio::exit.nok "Could not create persistent storage folder."
cp "$DEFAULT_FILES_PATH"/custom-template.sh "$CUSTOM_BASH_SCRIPTS_PATH"
fi
for script in "$CUSTOM_BASH_SCRIPTS_PATH"/*.sh; do
chmod +x "$script"
"$CUSTOM_BASH_SCRIPTS_PATH"/"$script"
done
}
run

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
ENABLE=false
if [ "$ENABLE" = true ]; then
echo "Custom Script"
fi