Fixup sogo spool cleanup cronjob

Add -user sogo to be on the safe side.
Change call to /bin/rmdir by -delete to avoid error messages.
Find would call rmdir and then do an openat() on the deleted directory,
which would obviously fail.

Fixes #2372
pull/13/head
Jean Raby 2013-09-03 09:59:01 -04:00
parent 573c2ec114
commit dceead3997
3 changed files with 3 additions and 3 deletions

View File

@ -4,4 +4,4 @@
SOGOSPOOL=/var/spool/sogo
/usr/sbin/tmpwatch 24 "$SOGOSPOOL"
find "$SOGOSPOOL" -depth -mindepth 1 -type d -empty -exec /bin/rmdir {} \; 2> /dev/null
find "$SOGOSPOOL" -mindepth 1 -type d -user sogo -empty -delete > /dev/null

View File

@ -3,4 +3,4 @@
SOGOSPOOL=/var/spool/sogo
/usr/sbin/tmpreaper 24 "$SOGOSPOOL"
find "$SOGOSPOOL" -mindepth 1 -type d -empty -exec /bin/rmdir {} \; 2> /dev/null
find "$SOGOSPOOL" -mindepth 1 -type d -user sogo -empty -delete > /dev/null

View File

@ -3,4 +3,4 @@
SOGOSPOOL=/var/spool/sogo
/usr/sbin/tmpreaper 24 "$SOGOSPOOL"
find "$SOGOSPOOL" -mindepth 1 -type d -empty -exec /bin/rmdir {} \; 2> /dev/null
find "$SOGOSPOOL" -mindepth 1 -type d -user sogo -empty -delete > /dev/null