aboutsummaryrefslogtreecommitdiff
path: root/Docker/entrypoint.sh
diff options
context:
space:
mode:
authorGravatar Chris Francy <zoredache@users.noreply.github.com> 2021-10-24 08:25:03 -0700
committerGravatar GitHub <noreply@github.com> 2021-10-24 17:25:03 +0200
commit07e00c7681e5fd9e680cba75125b166b96a96198 (patch)
tree724b01fd3e0b135ce56ac2c893f730b5de468973 /Docker/entrypoint.sh
parentc5ab4cea4a773b2d61e2413a955785431517c3ce (diff)
Docker: don't add crontab unless needed. (#3927)
Adding the crontab as part of the image build makes it more complicated to add custom entries to the crontab. Adjusting the image and entrypoint to make it so that the crontab is only added when CRON_MIN is set simplifies having a custom crontab.
Diffstat (limited to 'Docker/entrypoint.sh')
-rwxr-xr-xDocker/entrypoint.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh
index 7043cf153..d6cc34506 100755
--- a/Docker/entrypoint.sh
+++ b/Docker/entrypoint.sh
@@ -20,7 +20,8 @@ if [ -n "$CRON_MIN" ]; then
echo "export COPY_SYSLOG_TO_STDERR=$COPY_SYSLOG_TO_STDERR"
echo "export FRESHRSS_ENV=$FRESHRSS_ENV"
) >/var/www/FreshRSS/Docker/env.txt
- crontab -l | sed -r "\\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" | crontab -
+ sed </var/www/FreshRSS/Docker/crontab.default \
+ -r "s#^[^ ]+ #$CRON_MIN #" | crontab -
fi
if [ -n "$FRESHRSS_INSTALL" ]; then