mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-19 04:20:32 +02:00
Run cron artisan import as www-data to prevent permission conflicts
This commit is contained in:
committed by
GitHub
parent
92dbc30410
commit
3ad1b40ecf
@@ -15,8 +15,8 @@ CONFIGSOURCE="${CONFIG_LOCATION}"
|
||||
echo "[INFO] Running update according to defined schedule. Files located in $CONFIGSOURCE/import_files will be imported."
|
||||
if [ "${SILENT_MODE}" = "true" ]; then
|
||||
echo "[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 "$CONFIGSOURCE/import_files" >/dev/null
|
||||
sudo -Eu www-data /usr/local/bin/php /var/www/html/artisan importer:auto-import "$CONFIGSOURCE/import_files" >/dev/null
|
||||
else
|
||||
/usr/local/bin/php /var/www/html/artisan importer:auto-import "$CONFIGSOURCE/import_files"
|
||||
sudo -Eu www-data /usr/local/bin/php /var/www/html/artisan importer:auto-import "$CONFIGSOURCE/import_files"
|
||||
fi
|
||||
) &>/proc/1/fd/1
|
||||
|
||||
Reference in New Issue
Block a user