Oh, and the one in scripts/cron has a bug, it uses +1 instead of +0 for -mtime. It also deletes everything under /var/cosign, which might be a bit aggressive.
Chris On 2013-05-29 15:27, Chris Hecker wrote: > > Okay, is there any reason this is a bad idea? > > [root] /var/cosign# cat /etc/cron.hourly/cosign > #!/bin/bash > dirs=( /var/cosign/filter /var/cosign/daemon /var/cosign/tickets ) > for d in ${dirs[@]}; do > [ -d $d ] && /usr/bin/find $d -type f -mtime +0 | > /usr/bin/xargs /bin/rm -f > done > exit 0 > > I have other related stuff in /var/cosign and your script (and the one > in scripts) toasts everything old in subdirectories. > > I want to delete all three of those old files, right, tickets, daemon, > and filter (on machines running both the daemon and a service)? > > Thanks, > Chris > > > On 2013-05-15 05:19, Mark Montague wrote: >> On May 15, 2013 2:38 , Chris Hecker <chec...@d6.com> wrote: >>> I'm running cosignd and monster, and everything is working fine and has >>> been for years, but I just noticed the filter directory is filling up >>> with files. It's got 33k files in it already, from the past couple >>> years, so I'm assuming things are never getting deleted. >> >> For every machine that runs mod_cosign, including the central weblogin >> servers, you need to have a cron job that deletes old files from the >> filter directory. This is alluded to in the README file: >> >>> See README.scripts for a cron job that prunes old cookies from the >>> filter's database >> >> I think this could be more explicit. >> >> Here's the script I use, which is a little different than what is >> included in scripts/cron/cleanup: >> >> $ cat /etc/cron.hourly/cosign >> #!/bin/bash >> [ -d /var/cosign/filter ] || exit 0 >> /usr/bin/find /var/cosign -type f -mtime +0 | /usr/bin/xargs /bin/rm -f >> $ >> >> >> You'll need a similar script to clean up old Kerberos tickets from your >> tickets directory. >> >> >> -- >> Mark Montague >> m...@catseye.org >> >> . >> ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ Cosign-discuss mailing list Cosign-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cosign-discuss