1
0
mirror of https://github.com/zokradonh/kopano-docker synced 2025-06-07 07:56:12 +00:00
Felix Bartels 70e9940b38
Run all containers read-only (#314)
* switch containers in compose file to read-only
related to https://github.com/zokradonh/kopano-docker/issues/310
* make scheduler container read-only
* make meet container read-only
* fix konnect for read-only
* make core mostly read-only
* add custom location for ldap.cfg to default config
* sort config option for readability
* update makefile pull workaround
* make kdav read-only
* remove locale generation code from core startup
* fix commander tests
* fix store language tests
* add test for a dutch mailbox
* make it possible to run webapp read-only
* add locale hint to the compose file
* finish read-only mode for z-push
2020-01-14 14:31:53 +01:00

39 lines
850 B
Bash
Executable File

#!/bin/bash
set -eo pipefail
cronfile=/tmp/crontab
# purge existing entries from crontab
true > "$cronfile"
for cronvar in ${!CRON_*}; do
cronvalue=${!cronvar}
echo "Adding $cronvalue to crontab"
echo "$cronvalue" >> "$cronfile"
done
for cronvar in ${!CRONDELAYED_*}; do
cronvalue=${!cronvar}
echo "Adding $cronvalue to crontab (delayed)"
echo "$cronvalue" >> "$cronfile"
done
# wait for kopano_server statup to run one-off commands
dockerize \
-wait tcp://kopano_server:236 \
-timeout 360s
echo "creating public store"
docker exec kopano_server kopano-storeadm -h default: -P || true
echo "Running sheduled cron jobs once"
for cronvar in ${!CRON_*}; do
cronvalue=${!cronvar}
croncommand=$(echo "$cronvalue" | cut -d ' ' -f 6-)
echo "Running: $croncommand"
$croncommand
done
supercronic -test $cronfile
exec supercronic $cronfile