On 30/10/2018 14:21, Chris Green wrote:
[SNIP]
Alternatively where can I put a file that will get cleaned out periodically (like /tmp at reboot)?
This question still stands, where can a program write temporary files so that apache can display them?
I use a tool call tmpreaper to clear out certain directories on a regular basis. It works really well in cron:
# Run tmpreaper to clear amavis 12h old temporary files every 4 hours # This is needed in /var/amavis/tmp as it fills up so quickly # 00 */4 * * * /usr/sbin/tmpreaper 12h --ctime /var/lib/amavis/tmp/ 2>&1
# The quarantine can be cleared of week old files daily 00 02 * * * /usr/sbin/tmpreaper 7d --ctime /var/lib/amavis/virusmails/ 2>&1
https://packages.debian.org/sid/tmpreaper
[Heed the / warnings!]
http://manpages.ubuntu.com/manpages/trusty/man8/tmpreaper.8.html
Cheers, Laurie.