Fixed virus-wiper script when using the default value for VIRUSMAILS_…#540
Conversation
|
Restarted build. |
|
OK, this did not work. Apparently the environment variable is cleared before the cron job runs. Does this actually work when setting There are a few options left, but they all have to be done in the start script:
I would vote for (2) as I think this is the most straight-forward solution. |
|
Hmm it seems that current implementation does not work as expected, you're right (i've done that myself). I think that putting the ENV in |
…DELETE_DELAY Moved variable VIRUSMAILS_DELETE_DELAY to Dockerfile. This variable will be written to /etc/environment in the start script to make it visible to cron. Also removed echo in cron job to prevent sending mail for each run.
|
The start script will now write the variable to /etc/environment. I tested it manually this time (by adding a cron job which runs every minute) Oh, and there is a small fix by setting ONE_DIR to 0 in the Dockerfile. |
|
Thanks @danielpanteleit |
…DELETE_DELAY (docker-mailserver#540) Moved variable VIRUSMAILS_DELETE_DELAY to Dockerfile. This variable will be written to /etc/environment in the start script to make it visible to cron. Also removed echo in cron job to prevent sending mail for each run.
…DELETE_DELAY
Moved variable VIRUSMAILS_DELETE_DELAY to Dockerfile to make it visible to cron. Also removed echo in cron job to prevent sending mail for each run.
I would also suggest moving all default values to the Dockerfile so one can easily identify the used values with
docker inspect.