mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-20 04:50:31 +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."
|
echo "[INFO] Running update according to defined schedule. Files located in $CONFIGSOURCE/import_files will be imported."
|
||||||
if [ "${SILENT_MODE}" = "true" ]; then
|
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"
|
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
|
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
|
fi
|
||||||
) &>/proc/1/fd/1
|
) &>/proc/1/fd/1
|
||||||
|
|||||||
Reference in New Issue
Block a user