From d26df2779ee32a02ca6f53e4922ff3e2c5171048 Mon Sep 17 00:00:00 2001 From: Evilham Date: Mon, 1 Aug 2022 23:30:56 +0200 Subject: [PATCH] [nc] Add temporary queue processing from admin This should run scripts every minute and delete them on correct execution. --- dd-apps/docker/nextcloud/Dockerfile | 4 ++++ dd-apps/docker/nextcloud/nc-queue.sh | 5 +++++ 2 files changed, 9 insertions(+) create mode 100755 dd-apps/docker/nextcloud/nc-queue.sh diff --git a/dd-apps/docker/nextcloud/Dockerfile b/dd-apps/docker/nextcloud/Dockerfile index f21832f..137c8c3 100644 --- a/dd-apps/docker/nextcloud/Dockerfile +++ b/dd-apps/docker/nextcloud/Dockerfile @@ -66,6 +66,10 @@ RUN mkdir -p \ COPY supervisord.conf / +# Temporary replacement for a real queue +RUN echo '*/1 * * * * /nc-queue.sh' >> /etc/crontabs/www-data +COPY nc-queue.sh / + ENV NEXTCLOUD_UPDATE=1 CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] diff --git a/dd-apps/docker/nextcloud/nc-queue.sh b/dd-apps/docker/nextcloud/nc-queue.sh new file mode 100755 index 0000000..70e5fc4 --- /dev/null +++ b/dd-apps/docker/nextcloud/nc-queue.sh @@ -0,0 +1,5 @@ +#/bin/sh + +find "${NC_MAIL_QUEUE_FOLDER:-/nc-mail-queue}" -name '*.sh' -exec sh -c \ + 'cd /var/www/html && {} && rm {}' \ + ';'