Update 99-run.sh

This commit is contained in:
Alexandre
2025-02-06 10:36:51 +01:00
committed by GitHub
parent 8e2c1f8a33
commit 233e75e7e9

View File

@@ -12,7 +12,7 @@ if [ "$(ls -A "$CONFIGSOURCE/configurations")" ]; then
bashio::log.info "Configurations were found in $CONFIGSOURCE/configurations, they will be loaded." bashio::log.info "Configurations were found in $CONFIGSOURCE/configurations, they will be loaded."
JSON_CONFIGURATION_DIR="$CONFIGSOURCE/configurations" JSON_CONFIGURATION_DIR="$CONFIGSOURCE/configurations"
export JSON_CONFIGURATION_DIR export JSON_CONFIGURATION_DIR
chown -R www-data:www-data "$CONFIGSOURCE" sudo chown -R www-data:www-data "$CONFIGSOURCE"
fi fi
# Allow config dir # Allow config dir
@@ -39,14 +39,14 @@ if bashio::config.has_value 'Updates'; then
echo "" echo ""
# Sets cron // do not delete this message # Sets cron // do not delete this message
cp /templates/cronupdate /etc/cron."${FREQUENCY}"/ sudo cp /templates/cronupdate /etc/cron."${FREQUENCY}"/
chmod 777 /etc/cron."${FREQUENCY}"/cronupdate sudo chmod 777 /etc/cron."${FREQUENCY}"/cronupdate
# Sets cron to run with www-data user # Sets cron to run with www-data user
# sed -i 's|root|www-data|g' /etc/crontab # sed -i 's|root|www-data|g' /etc/crontab
# Starts cron # Starts cron
service cron start sudo service cron start
# Export variables # Export variables
IMPORT_DIR_WHITELIST="${CONFIGSOURCE}/import_files" IMPORT_DIR_WHITELIST="${CONFIGSOURCE}/import_files"