瀏覽代碼

Fix cron regression (#3933)

#fix https://github.com/FreshRSS/FreshRSS/pull/3927/files#r735146297
The path `/var/www/FreshRSS/` might be a Docker volume, breaking files created there during Docker build
Alexandre Alapetite 4 年之前
父節點
當前提交
d924fc5fbb
共有 6 個文件被更改,包括 6 次插入6 次删除
  1. 1 1
      Docker/Dockerfile
  2. 1 1
      Docker/Dockerfile-Alpine
  3. 1 1
      Docker/Dockerfile-Newest
  4. 1 1
      Docker/Dockerfile-Oldest
  5. 1 1
      Docker/Dockerfile-QEMU-ARM
  6. 1 1
      Docker/entrypoint.sh

+ 1 - 1
Docker/Dockerfile

@@ -45,7 +45,7 @@ RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.co
 	touch /var/www/FreshRSS/Docker/env.txt && \
 	echo "7,37 * * * * . /var/www/FreshRSS/Docker/env.txt; \
 		su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
-		2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /var/www/FreshRSS/Docker/crontab.default
+		2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /etc/crontab.freshrss.default
 
 ENV COPY_LOG_TO_SYSLOG On
 ENV COPY_SYSLOG_TO_STDERR On

+ 1 - 1
Docker/Dockerfile-Alpine

@@ -42,7 +42,7 @@ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
 	touch /var/www/FreshRSS/Docker/env.txt && \
 	echo "27,57 * * * * . /var/www/FreshRSS/Docker/env.txt; \
 		su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
-		2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /var/www/FreshRSS/Docker/crontab.default
+		2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /etc/crontab.freshrss.default
 
 ENV COPY_LOG_TO_SYSLOG On
 ENV COPY_SYSLOG_TO_STDERR On

+ 1 - 1
Docker/Dockerfile-Newest

@@ -42,7 +42,7 @@ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
 	touch /var/www/FreshRSS/Docker/env.txt && \
 	echo "27,57 * * * * . /var/www/FreshRSS/Docker/env.txt; \
 		su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
-		2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /var/www/FreshRSS/Docker/crontab.default
+		2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /etc/crontab.freshrss.default
 
 ENV COPY_LOG_TO_SYSLOG On
 ENV COPY_SYSLOG_TO_STDERR On

+ 1 - 1
Docker/Dockerfile-Oldest

@@ -42,7 +42,7 @@ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
 	touch /var/www/FreshRSS/Docker/env.txt && \
 	echo "27,57 * * * * . /var/www/FreshRSS/Docker/env.txt; \
 		su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
-		2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /var/www/FreshRSS/Docker/crontab.default
+		2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /etc/crontab.freshrss.default
 
 ENV COPY_LOG_TO_SYSLOG On
 ENV COPY_SYSLOG_TO_STDERR On

+ 1 - 1
Docker/Dockerfile-QEMU-ARM

@@ -51,7 +51,7 @@ RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.co
 	touch /var/www/FreshRSS/Docker/env.txt && \
 	echo "17,47 * * * * . /var/www/FreshRSS/Docker/env.txt; \
 		su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
-		2>> /proc/1/fd/2 > /tmp/FreshRSS.log"  > /var/www/FreshRSS/Docker/crontab.default
+		2>> /proc/1/fd/2 > /tmp/FreshRSS.log"  > /etc/crontab.freshrss.default
 
 # Seems needed for arm32v7/ubuntu on Docker Hub
 RUN update-ca-certificates -f

+ 1 - 1
Docker/entrypoint.sh

@@ -20,7 +20,7 @@ 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
-	sed </var/www/FreshRSS/Docker/crontab.default \
+	sed </etc/crontab.freshrss.default \
 		-r "s#^[^ ]+ #$CRON_MIN #" | crontab -
 fi