This commit is contained in:
Richard Sperry 2025-04-16 19:19:51 -07:00
parent c9d377307c
commit 5ccfde1c0d

View file

@ -15,17 +15,17 @@ run() {
bashio::log.warning "CUSTOM_BASH_SCRIPTS_PATH path did not exist, creating $CUSTOM_BASH_SCRIPTS_PATH" bashio::log.warning "CUSTOM_BASH_SCRIPTS_PATH path did not exist, creating $CUSTOM_BASH_SCRIPTS_PATH"
mkdir -p "$CUSTOM_BASH_SCRIPTS_PATH" || mkdir -p "$CUSTOM_BASH_SCRIPTS_PATH" ||
bashio::exit.nok "Could not create persistent storage folder." bashio::exit.nok "Could not create persistent storage folder."
if [[ ! -e "$DEFAULT_FILES_PATH"/custom-template.sh ]]; then
bashio::log.warning "custom-template.sh does not exist."
cp "$DEFAULT_FILES_PATH"/custom-template.sh "$CUSTOM_BASH_SCRIPTS_PATH"/custom-template.sh
fi
fi fi
if [[ ! -e "$DEFAULT_FILES_PATH"/custom-template.sh ]]; then for script in "${CUSTOM_BASH_SCRIPTS_PATH}"/*.sh
bashio::log.warning "custom-template.sh does not exist." do
cp "$DEFAULT_FILES_PATH"/custom-template.sh "$CUSTOM_BASH_SCRIPTS_PATH"/custom-template.sh echo "Config script: $script"
fi
for script in "${CUSTOM_BASH_SCRIPTS_PATH}"/*.sh; do
bashio::log.info "Config script: $script"
chmod +x "$script" chmod +x "$script"
"$CUSTOM_BASH_SCRIPTS_PATH"/"$script" "$script"
done done
} }