From ef1f52560cb5005221f259644ad292b90ffb89f3 Mon Sep 17 00:00:00 2001 From: "flow.gunso" Date: Wed, 24 Apr 2019 14:40:25 +0200 Subject: [PATCH] Run cron as root --- Dockerfile.cron | 1 - assets/docker-bash-entrypoint.sh | 4 +++- assets/seafile-cron-entrypoint.sh | 5 +---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile.cron b/Dockerfile.cron index 3a5cbb0..3cd88ab 100644 --- a/Dockerfile.cron +++ b/Dockerfile.cron @@ -51,7 +51,6 @@ RUN mkdir -p /etc/apt/sources.list.d/ ;\ echo "seafuser" > /etc/cron.allow ;\ echo "*/20 * * * * /bin/bash /home/seafuser/infinite-seaf-cli-start.sh" \ > /var/spool/cron/crontabs/seafuser ;\ - touch /var/run/crond.pid ;\ groupadd -g $GID -o $UNAME ;\ useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME diff --git a/assets/docker-bash-entrypoint.sh b/assets/docker-bash-entrypoint.sh index c446e0f..43711a7 100644 --- a/assets/docker-bash-entrypoint.sh +++ b/assets/docker-bash-entrypoint.sh @@ -51,4 +51,6 @@ su - $UNAME << EO export SEAF_LIBRARY_UUID=$SEAF_LIBRARY_UUID export UNAME=$UNAME /bin/bash /home/seafuser/entrypoint.sh -EO \ No newline at end of file +EO + +cron -f \ No newline at end of file diff --git a/assets/seafile-cron-entrypoint.sh b/assets/seafile-cron-entrypoint.sh index 5eda987..7716ba7 100644 --- a/assets/seafile-cron-entrypoint.sh +++ b/assets/seafile-cron-entrypoint.sh @@ -33,7 +33,4 @@ while [ ! -f $seafile_ini ]; do sleep 1; done while [ ! -S $seafile_sock ]; do sleep 1; done # Start the synchronisation. -/usr/bin/seaf-cli sync -u $SEAF_USERNAME -p $SEAF_PASSWORD -s $SEAF_SERVER_URL -l $SEAF_LIBRARY_UUID -d /volume - -# Start the supervisord. -/usr/sbin/cron -f \ No newline at end of file +/usr/bin/seaf-cli sync -u $SEAF_USERNAME -p $SEAF_PASSWORD -s $SEAF_SERVER_URL -l $SEAF_LIBRARY_UUID -d /volume \ No newline at end of file