-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 19 May 2002 04:47 pm, john-paul delaney wrote:
> Thanks Michael and Emmanuel... you've taught me something new.
>
> Anyone have an idea how can I prevent tmpwatch removing the
> sub-directory /tmp/apache (at least until I move the apache directory
> to a safer home) but still run on /tmp as normal?

You could edit /etc/cron.daily/tmpwatch, and change:
/usr/sbin/tmpwatch 240 /tmp
to:
/usr/sbin/tmpwatch 720 /tmp
Which would give you 30 days.

Or write a quick script to modify the access time on the files you want to 
keep.

#! /bin/sh
for file in /tmp/apache/* ; do
  touch -a "$file"
done
exit

Untested, but something similar should do the trick. Just run it as a cron 
job daily and it should keep the atime current enough that tmpwatch will 
ignore it. I'm not sure if just touching the apache directory will 
protect the contents as well, though it probably should.

- -- 
- -Michael

pgp key:  http://www.tuxfan.homeip.net:8080/gpgkey.txt
Red Hat Linux 7.2 in 8M of RAM: http://www.rule-project.org/
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjzn3Q8ACgkQn/07WoAb/Ssp8gCeKLIv9jJUMfuBbHpqQZppLDo7
+HwAoKXRpQlXfsA8E3Tf3XzsZJQUt6Bu
=UYKs
-----END PGP SIGNATURE-----



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to