diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index 635b9ce..a850ddb 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -75,6 +75,7 @@ RUN ln -sf /opt/config/nginx.conf /etc/nginx/sites-enabled/default; \ RUN chown www-data /opt/config ADD start.sh /usr/local/bin/run +ADD cron.sh /usr/local/bin/cron.sh VOLUME /opt/storage /opt/config /opt/log /opt/static EXPOSE 9787/tcp ENTRYPOINT /usr/local/bin/run diff --git a/nextcloud/cron.sh b/nextcloud/cron.sh new file mode 100755 index 0000000..7fa6e49 --- /dev/null +++ b/nextcloud/cron.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +set -e + +echo "Preparing environment" +cd /var/www/nextcloud +chmod +x ./occ + +echo "Syncing system address books with dav" +su -s /var/www/nextcloud/occ www-data dav:sync-system-addressbook + +echo "Running cron.php" +su -s /usr/bin/php www-data /var/www/nextcloud/cron.php +