initial build

This commit is contained in:
Alexandre
2022-03-07 09:49:13 +01:00
parent c82068495f
commit 5d3a263d20
15 changed files with 389 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bashio
# shellcheck shell=bash
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"
su -l www-data -s /bin/bash -c "/usr/local/bin/php /var/www/html/artisan importer:auto-import >/dev/null"
else
su -l www-data -s /bin/bash -c "/usr/local/bin/php /var/www/html/artisan importer:auto-import $PATHTOFILES/import_files"
fi
) &>/proc/1/fd/1