Skip to content

Commit

Permalink
Matomo: try to fix scheduler permission issue
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed Sep 28, 2024
1 parent ff2db96 commit 69b0bb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions matomo/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ matomo_update_config() {
"mail.encryption=\"$MATOMO_SMTP_ENCRYPTION\""
}

# Just in case, correct permissions
chown -R www-data:www-data .

# Only initialize if we do NOT have a config file
if [ ! -f "$config_file" ]; then
start_server
Expand Down
3 changes: 1 addition & 2 deletions matomo/scripts/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set -euo pipefail

if [ ! -e matomo.php ]; then
tar cf - --one-file-system -C /usr/src/matomo . | tar xf -
chown -R www-data:www-data .
fi


Expand All @@ -21,7 +20,7 @@ if [ "$1" = 'serve' ]; then

# Helper to run cron jobs
elif [ "$1" = 'scheduler' ]; then
exec php console core:archive --verbose --no-interaction
exec su www-data -s /bin/sh -c 'php console core:archive --verbose --no-interaction'

# Init script, for use in initContainers (for example)
elif [ "$1" = 'init' ]; then
Expand Down

0 comments on commit 69b0bb5

Please sign in to comment.