[Dovecot] Add new imapsync + dependencies

[Dovecot] Syslog-ng: Do not trim after each push to Redis
[Dovecot] Add new cronjob to trim all Redis logs every minute (will be moved in the future)
This commit is contained in:
André
2018-08-02 12:14:13 +02:00
parent 241c6f0411
commit 04b43d0a3b
4 changed files with 18 additions and 11 deletions

View File

@@ -7,10 +7,11 @@ while ! mysqladmin ping --host mysql -u${DBUSER} -p${DBPASS} --silent; do
sleep 2
done
# Hard-code env vars to imapsync due to cron not passing them to the perl script
# Hard-code env vars to scripts due to cron not passing them to the perl script
sed -i "/^\$DBUSER/c\\\$DBUSER='${DBUSER}';" /usr/local/bin/imapsync_cron.pl
sed -i "/^\$DBPASS/c\\\$DBPASS='${DBPASS}';" /usr/local/bin/imapsync_cron.pl
sed -i "/^\$DBNAME/c\\\$DBNAME='${DBNAME}';" /usr/local/bin/imapsync_cron.pl
sed -i "s/LOG_LINES/${LOG_LINES}/g" /usr/local/bin/trim_logs.sh
# Create missing directories
[[ ! -d /usr/local/etc/dovecot/sql/ ]] && mkdir -p /usr/local/etc/dovecot/sql/