From 15df7c82d6ba003478b4c76ac4d628644596018e Mon Sep 17 00:00:00 2001 From: Victor Arribas <5702557+varhub@users.noreply.github.com> Date: Wed, 27 Apr 2022 11:48:54 +0200 Subject: [PATCH] cron: set explicit path at docker-volume-backup this will ensure that both 'cron based' and 'manual execution' of backup.sh will use the same PATH providing consistency during testing fixes #56 --- src/entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 47ec835..6e91c71 100644 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -50,7 +50,10 @@ fi # Add our cron entry, and direct stdout & stderr to Docker commands stdout echo "Installing cron.d entry: docker-volume-backup" -echo "$BACKUP_CRON_EXPRESSION root /root/backup.sh > /proc/1/fd/1 2>&1" > /etc/cron.d/docker-volume-backup +cat</etc/cron.d/docker-volume-backup +PATH=$PATH +$BACKUP_CRON_EXPRESSION root /root/backup.sh > /proc/1/fd/1 2>&1 +EOF # Let cron take the wheel echo "Starting cron in foreground with expression: $BACKUP_CRON_EXPRESSION"