[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: roundcube



On Sun, 2007-02-11 at 21:58 +0100, Vincent Bernat wrote:
> > as for the tmp dir issue, if you don't feel safe using /var/tmp, you
> > should use /var/cache/package/some-subdirectory-name instead, along with
> > a cronjob to clear out the old files.  i'd recommend using a
> > subdirectory so you have the freedom to use the parent directory for
> > more later in case the need ever arises.
> 
> OK. Any tip for the cronjob ? 15 days old files ? Something like :
>  find /var/cache/roundcube/temp -type f -mtime +15 -print0 | xargs -0 rm

it really depends on the application and what the data in question is.
if it's data that will only be used once ever, perhaps it's overkill to
be using /var/cache at all and /var/tmp would be better.  if it's data
that might be used a few times and regenerated if needed,
then /var/cache is definitely the right place for it.

in any case, if you use something outside of /var/tmp, i'd suggest
making the mtime parameter configurable:

MAX_TMPFILE_LIFETIME=15
# MAX_TMPFILE_LIFETIME can be overridden in this file
if [ -r /etc/default/roundcube ]; then
	. /etc/default/roundcube
fi
find /var/cache/roundcube/temp -type f -mtime +$MAX_TMPFILE_LIFETIME ...


	sean

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: