add auto options

This commit is contained in:
Alexandre
2022-02-05 19:28:41 +01:00
parent 8be9a1dcfc
commit 441989f2b6
7 changed files with 137 additions and 14 deletions

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bashio
PATHTOFILES="$(bashio::config "CONFIG_LOCATION")"
PATHTOFILES="$(dirname "${PATHTOFILES}")"
bashio::log.info "Running update according to defined schedule. Files located in $PATHTOFILES will be imported"
if bashio::config.true 'silent'; then
bashio::log.warning "Silent mode activated. Only errors will be shown. Please disable in addon options if you need to debug"
/usr/local/bin/php /var/www/html/artisan importer:auto-import >/dev/null
else
/usr/local/bin/php /var/www/html/artisan importer:auto-import "$PATHTOFILES"/import_files
fi
fi