mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-05 23:34:19 -04:00
Merge pull request #2605 from 0rax/develop
Add the ability to run crond inside the Docker container
This commit is contained in:
commit
1fa4fe706a
0
docker/s6/crond/down
Normal file
0
docker/s6/crond/down
Normal file
9
docker/s6/crond/run
Executable file
9
docker/s6/crond/run
Executable file
@ -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
|
@ -48,6 +48,15 @@ else
|
|||||||
create_socat_links
|
create_socat_links
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CROND=$(echo "$RUN_CROND" | tr '[:upper:]' '[:lower:]')
|
||||||
|
if [ "$CROND" = "true" -o "$CROND" = "1" ]; then
|
||||||
|
echo "init:crond | Cron Daemon (crond) will be run as requested by s6" 1>&2
|
||||||
|
rm -f /app/gogs/docker/s6/crond/down
|
||||||
|
else
|
||||||
|
# Tell s6 not to run the crond service
|
||||||
|
touch /app/gogs/docker/s6/crond/down
|
||||||
|
fi
|
||||||
|
|
||||||
# Exec CMD or S6 by default if nothing present
|
# Exec CMD or S6 by default if nothing present
|
||||||
if [ $# -gt 0 ];then
|
if [ $# -gt 0 ];then
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user