[Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-15 Thread Chris Hecker
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. The daemon directory has a

Re: [Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-15 Thread Mark Montague
On May 15, 2013 2:38 , Chris Hecker 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 nev

Re: [Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-15 Thread Chris Hecker
Ah, I figured that's what the monster process did, but I guess that only does stuff on the central login stuff in daemon? Thanks, I'll check out the readme. Chris Mark Montague wrote: On May 15, 2013 2:38 , Chris Hecker wrote: > I'm running cosignd and monster, and everything is working fine

Re: [Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-29 Thread Chris Hecker
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

Re: [Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-29 Thread Chris Hecker
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/cro

Re: [Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-30 Thread Mark Montague
On May 29, 2013 18:28 , Chris Hecker wrote: > Oh, and the one in scripts/cron has a bug, it uses +1 instead of +0 for > -mtime. This is not a bug, "-mtime +0" assumes that you are using GNU find. "-mtime +1", while more lax, will work correctly with all versions of find. In practice, it is not

Re: [Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-30 Thread Chris Hecker
> This is not a bug, "-mtime +0" assumes that you are using GNU find. > "-mtime +1", while more lax, will work correctly with all versions > of find. In practice, it is not a problem if some cookies/tickets > hang around for an extra day. Ah, got it, thanks, that was byond my unix knowledge. May

Re: [Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-30 Thread Russ Allbery
Chris Hecker writes: > 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

Re: [Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-30 Thread Chris Hecker
Ah, good point, thanks! Chris On 2013-05-30 12:48, Russ Allbery wrote: > Chris Hecker writes: > >> 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

Re: [Cosign-discuss] filter directory filling up (and tickets, less so)

2013-05-31 Thread Martin Sucha
Hi, > #!/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 guess -delete can be used instead of xargs? [ -d "$d" ] && /usr/bin