[icinga-checkins] icinga.org: icinga-web/mfrosch/fixes: better clearcache handling with find

git at icinga.org git at icinga.org
Wed Nov 14 16:38:52 CET 2012


Module: icinga-web
Branch: mfrosch/fixes
Commit: 54c86ac5af85c26fc3e97919157f327c079b2c6b
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=54c86ac5af85c26fc3e97919157f327c079b2c6b

Author: Markus Frosch <markus.frosch at netways.de>
Date:   Wed Nov 14 16:37:55 2012 +0100

better clearcache handling with find

Avoids globing via rm $DIR/* and also does not interfere
with bash aliases for rm.

---

 bin/clearcache.sh.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/clearcache.sh.in b/bin/clearcache.sh.in
index 60d29d6..00bc9b4 100644
--- a/bin/clearcache.sh.in
+++ b/bin/clearcache.sh.in
@@ -43,7 +43,7 @@ for CUR_CDIR in $CCDIR; do
 
 		msg_start "Deleting cache from $CUR_CNAME ($CC_FILES files)"
 
-		rm $CUR_CDIR/* > /dev/null 2>&1
+		find $CUR_CDIR/* | xargs -n5 -r rm
 
 		msg_result
 





More information about the icinga-checkins mailing list