From 449f5e7d4c15b3efb85d49ad74fdef0bb951ffda Mon Sep 17 00:00:00 2001 From: charleszlu Date: Thu, 30 May 2019 21:39:38 +1000 Subject: [PATCH] Fixed crontab --- docker-entrypoint.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 6586d2b..925ab05 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -37,10 +37,12 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command ${CRON_SCHEDULE} /usr/sbin/autopostgresqlbackup EOF + crontab /etc/crontab else echo "Using cron.daily schedule..." + echo -e "#!/bin/bash\n/usr/sbin/autopostgresqlbackup" > /etc/periodic/daily/backup.sh + chmod +x /etc/periodic/daily/backup.sh fi -crontab /etc/crontab # Create the file echo "Creating the password file..." @@ -53,4 +55,4 @@ chmod 0600 ${HOME}/.pgpass # Execute cron with parameters (autopostgresql script is under /etc/cron.daily) echo "Execute cron service..." -exec cron -f -l ${CRON_LOG_LEVEL:-8} \ No newline at end of file +exec crond -f -l ${CRON_LOG_LEVEL:-8} \ No newline at end of file