fix Bug 56967/Add ImapSyncStartDate value substitution (#152)

* Add ImapSyncStartDate value substitution

* Add MAIL_IMAPSYNC_START_DATE variable

* Change the ImapSyncStartDate date
This commit is contained in:
Evgeniy Antonyuk 2022-05-19 17:26:38 +03:00 committed by GitHub
parent a6b2d64c2e
commit 10e2233791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -431,6 +431,9 @@ if [ ${MAIL_SERVER_DB_HOST} ]; then
fi fi
fi fi
MAIL_IMAPSYNC_START_DATE=${MAIL_IMAPSYNC_START_DATE:-$(date +"%Y-%m-%dT%H:%M:%S")};
sed 's_\(\"ImapSyncStartDate":\).*,_\1 "'${MAIL_IMAPSYNC_START_DATE//T*/}'",_' -i ${APP_CONFIG_DIR}/mail.production.json
sed "/mail\.imap-sync-start-date/s/value=\"\S*\"/value=\"${MAIL_IMAPSYNC_START_DATE}\"/g" -i ${APP_ROOT_DIR}/web.appsettings.config
if [ ${MAIL_SERVER_API_HOST} ]; then if [ ${MAIL_SERVER_API_HOST} ]; then
if [ ! bash ${SYSCONF_TOOLS_DIR}/wait-for-it.sh ${MAIL_SERVER_API_HOST}:25 --timeout=300 --quiet -s -- echo "MailServer is up" ]; then if [ ! bash ${SYSCONF_TOOLS_DIR}/wait-for-it.sh ${MAIL_SERVER_API_HOST}:25 --timeout=300 --quiet -s -- echo "MailServer is up" ]; then