diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/maintenance.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/maintenance.sh b/bin/maintenance.sh index bb75c5dc..41c166b5 100755 --- a/bin/maintenance.sh +++ b/bin/maintenance.sh @@ -62,9 +62,12 @@ report_old_directories() { # find and warn about old temp directories if [ -z "$3" ] ; then OLDSTUFF=$(find $1/* -maxdepth 0 -type d -mtime +$2 -exec ls -lad {} \;) - else + elif [ -z "$4" ] ; then # if $3 is given, ignore it OLDSTUFF=$(find $1/* -maxdepth 0 -type d -mtime +$2 ! -path "$3*" -exec ls -lad {} \;) + else + # if $3 + $4 are given, ignore them + OLDSTUFF=$(find $1/* -maxdepth 0 -type d -mtime +$2 ! -path "$3*" ! -path "$4*" -exec ls -lad {} \;) fi if [ ! -z "$OLDSTUFF" ] ; then echo "Warning: old temp directories found in $1" @@ -193,7 +196,7 @@ else echo "WARNING: there is no check / handling on stale lvm volumes" rm $ACTIVE_JOBS $WATCHED_JOBS $RUNNING ;; - d-i) report_old_directories /srv/d-i 7 /srv/d-i/workspace + d-i) report_old_directories /srv/d-i 7 /srv/d-i/workspace /srv/d-i/isos ;; squid) report_squid_usage ;; |