fix: auto-fix linting issues

This commit is contained in:
alexbelgium
2025-06-10 10:06:17 +00:00
committed by github-actions[bot]
parent e5adbd266f
commit f728166b14
197 changed files with 5747 additions and 5714 deletions

View File

@@ -9,9 +9,9 @@ CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
#################
if [ "$(ls -A "$CONFIGSOURCE/configurations")" ]; then
bashio::log.info "Configurations were found in $CONFIGSOURCE/configurations, they will be loaded."
JSON_CONFIGURATION_DIR="$CONFIGSOURCE/configurations"
export JSON_CONFIGURATION_DIR
bashio::log.info "Configurations were found in $CONFIGSOURCE/configurations, they will be loaded."
JSON_CONFIGURATION_DIR="$CONFIGSOURCE/configurations"
export JSON_CONFIGURATION_DIR
fi
# Allow config dir
@@ -31,36 +31,36 @@ export CAN_POST_AUTOIMPORT="$(bashio::config "CAN_POST_AUTOIMPORT")"
if bashio::config.has_value 'Updates'; then
# Align update with options
echo ""
FREQUENCY=$(bashio::config 'Updates')
bashio::log.info "$FREQUENCY updates"
echo ""
# Align update with options
echo ""
FREQUENCY=$(bashio::config 'Updates')
bashio::log.info "$FREQUENCY updates"
echo ""
# Sets cron // do not delete this message
cp /templates/cronupdate /etc/cron."${FREQUENCY}"/
chmod 777 /etc/cron."${FREQUENCY}"/cronupdate
# Sets cron // do not delete this message
cp /templates/cronupdate /etc/cron."${FREQUENCY}"/
chmod 777 /etc/cron."${FREQUENCY}"/cronupdate
# Sets cron to run with www-data user
# sed -i 's|root|www-data|g' /etc/crontab
# Sets cron to run with www-data user
# sed -i 's|root|www-data|g' /etc/crontab
# Starts cron
service cron start
# Starts cron
service cron start
# Export variables
IMPORT_DIR_WHITELIST="${CONFIGSOURCE}/import_files"
export IMPORT_DIR_WHITELIST
# Export variables
IMPORT_DIR_WHITELIST="${CONFIGSOURCE}/import_files"
export IMPORT_DIR_WHITELIST
bashio::log.info "Automatic updates were requested. The files in ${CONFIGSOURCE}/import_files will be imported $FREQUENCY."
bashio::log.info "Automatic updates were requested. The files in ${CONFIGSOURCE}/import_files will be imported $FREQUENCY."
if [ ! "$(ls -A "${CONFIGSOURCE}"/import_files)" ]; then
bashio::log.fatal "Automatic updates were requested, but there are no configuration files in ${CONFIGSOURCE}/import_files. There will therefore be be no automatic updates."
true
fi
if [ ! "$(ls -A "${CONFIGSOURCE}"/import_files)" ]; then
bashio::log.fatal "Automatic updates were requested, but there are no configuration files in ${CONFIGSOURCE}/import_files. There will therefore be be no automatic updates."
true
fi
else
bashio::log.info "Automatic updates not set in addon config. If you add configuration files in ${CONFIGSOURCE}/import_files, they won't be automatically updated."
bashio::log.info "Automatic updates not set in addon config. If you add configuration files in ${CONFIGSOURCE}/import_files, they won't be automatically updated."
fi