aboutsummaryrefslogtreecommitdiffstats
path: root/docker/s6
diff options
context:
space:
mode:
authorJean-Philippe Roemer <jp@roemer.im>2016-02-12 02:38:18 +0000
committerJean-Philippe Roemer <jp@roemer.im>2016-02-12 02:48:55 +0000
commitf4bc9263d97d55e811aeff383545fea7476105ba (patch)
tree178ba5334e7c9c0a3e10bffe51a666cf3b5cc3a0 /docker/s6
parent600d8edaca56ac9b74bd73c3625c17875ecb848e (diff)
downloadgitea-f4bc9263d97d55e811aeff383545fea7476105ba.tar.gz
gitea-f4bc9263d97d55e811aeff383545fea7476105ba.zip
Add the ability to run crond inside the Docker container
- Add the crond init script for s6 - Add the RUN_CROND configuration variable to setup crond - Crond will not be run by default (hence the `down` file in the service directory) - `start.sh` check if RUN_CROND = "true" || "1" and remove this file to tell s6 to run the initscript - Resolves #2597
Diffstat (limited to 'docker/s6')
-rw-r--r--docker/s6/crond/down0
-rwxr-xr-xdocker/s6/crond/run9
2 files changed, 9 insertions, 0 deletions
diff --git a/docker/s6/crond/down b/docker/s6/crond/down
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/docker/s6/crond/down
diff --git a/docker/s6/crond/run b/docker/s6/crond/run
new file mode 100755
index 0000000000..9aa9fb9f27
--- /dev/null
+++ b/docker/s6/crond/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Crontabs are located by default in /var/spool/cron/crontabs/
+# The default configuration is also calling all the scripts in /etc/periodic/${period}
+
+if test -f ./setup; then
+ source ./setup
+fi
+
+exec gosu root /usr/sbin/crond -fS