aboutsummaryrefslogtreecommitdiff
path: root/docker/entrypoint.sh
diff options
context:
space:
mode:
authorZicklag <zicklag@katharostech.com>2019-04-09 15:57:38 +0000
committerZicklag <zicklag@katharostech.com>2019-04-09 13:22:46 -0500
commit3895c868121d747392300a27158dd438b9b53c21 (patch)
tree98eea3a7a249fabfc6b0c62537b223d6f2d8a551 /docker/entrypoint.sh
parenta41ba791191fd5188c044fe540ae21550fe965c0 (diff)
downloadseaweedfs-3895c868121d747392300a27158dd438b9b53c21.tar.xz
seaweedfs-3895c868121d747392300a27158dd438b9b53c21.zip
Add cronjob Mode For The Docker Container
fixes #907
Diffstat (limited to 'docker/entrypoint.sh')
-rwxr-xr-xdocker/entrypoint.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 660e51766..4e0d659ae 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -44,6 +44,14 @@ case "$1" in
exec /usr/bin/weed $@ $ARGS
;;
+ 'cronjob')
+ MASTER=${WEED_MASTER-localhost:9333}
+ CRON_SCHEDULE=${CRON_SCHEDULE-*/5 * * * * *}
+ echo "$CRON_SCHEDULE" 'echo "volume.fix.replication" | weed shell -master='$MASTER > /crontab
+ echo "Running Crontab:"
+ cat /crontab
+ exec supercronic /crontab
+ ;;
*)
exec /usr/bin/weed $@
;;