[mailcow] Use ofelia instead of cron daemons (wip: remove init systems)

This commit is contained in:
andryyy
2021-04-16 20:38:09 +02:00
parent 2b2e139d7a
commit 971434ddd3
11 changed files with 85 additions and 69 deletions

View File

@@ -4,14 +4,13 @@ LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
ARG DEBIAN_FRONTEND=noninteractive
ARG SOGO_DEBIAN_REPOSITORY=http://packages.inverse.ca/SOGo/nightly/5/debian/
ENV LC_ALL C
ENV GOSU_VERSION 1.11
ENV GOSU_VERSION 1.12
# Prerequisites
RUN echo "Building from repository $SOGO_DEBIAN_REPOSITORY" \
&& apt-get update && apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
cron \
gettext \
gnupg \
mariadb-client \

View File

@@ -249,14 +249,4 @@ rsync -a /usr/lib/GNUstep/SOGo/. /sogo_web/
# Chown backup path
chown -R sogo:sogo /sogo_backup
# Creating cronjobs
if [[ "${MASTER}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
echo "* * * * * sogo /usr/sbin/sogo-ealarms-notify -p /etc/sogo/sieve.creds 2>/dev/null" > /etc/cron.d/sogo
echo "* * * * * sogo /usr/sbin/sogo-tool expire-sessions ${SOGO_EXPIRE_SESSION}" >> /etc/cron.d/sogo
echo "0 0 * * * sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds" >> /etc/cron.d/sogo
echo "0 2 * * * sogo /usr/sbin/sogo-tool backup /sogo_backup ALL" >> /etc/cron.d/sogo
else
rm /etc/cron.d/sogo
fi
exec gosu sogo /usr/sbin/sogod

View File

@@ -11,18 +11,13 @@ stderr_logfile_maxbytes=0
autostart=true
priority=1
[program:cron]
command=/usr/sbin/cron -f
autorestart=true
priority=2
[program:bootstrap-sogo]
command=/bootstrap-sogo.sh
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
priority=3
priority=2
startretries=10
autorestart=true
stopwaitsecs=120