[icinga-checkins] icinga.org: icinga-web/master: * Fixed typo (thanks to yoris, fixes #1397) and added additional cache

git at icinga.org git at icinga.org
Thu Apr 14 07:36:03 CEST 2011


Module: icinga-web
Branch: master
Commit: c117001106fea7034dba7b2b54072e6a903af79d
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=c117001106fea7034dba7b2b54072e6a903af79d

Author: jmosshammer <jannis.mosshammer at netways.de>
Date:   Thu Apr 14 07:31:25 2011 +0200

* Fixed typo (thanks to yoris, fixes #1397) and added additional cache
clean routines

---

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

diff --git a/bin/clearcache.sh.in b/bin/clearcache.sh.in
index 0470501..277639d 100644
--- a/bin/clearcache.sh.in
+++ b/bin/clearcache.sh.in
@@ -32,29 +32,29 @@ fi
 
 echo "Basedir: $PREFIX"
 
-CCDIR="$PREFIX/app/cache/config"
-CC_FILES=$(ls $CCDIR/*.php 2>/dev/null | wc -l)
-
-if [[ $CC_FILES -gt 0 ]]; then
-
-	msg_start "Deleting config cache ($CC_FILES files)"
-	
-	rm $CCDIR/*php > /dev/null 2>&1
-	
-	msg_result
-	
-fi
-
-COCDIR="$PREFIX/app/cache/content"
+CCDIR="$PREFIX/app/cache/config $PREFIX/app/modules/AppKit/cache/* $PREFIX/app/modules/Cronks/cache/*"
+
+for CUR_CDIR in $CCDIR; do
+	CC_FILES=$(ls $CUR_CDIR/*.php 2>/dev/null | wc -l)
+	if [[ $CC_FILES -gt 0 ]]; then
+
+		msg_start "Deleting config cache ($CC_FILES files)"
+		
+		rm $CUR_CDIR/*php > /dev/null 2>&1
+		
+		msg_result
+		
+	fi
+done
+CODIR="$PREFIX/app/cache/content"
 
 if [[ -e $CODIR ]]; then
 
-	msg_start "Deleting content cache dir"
+	msg_start "Deleting additionak cache dirs"
 	
 	rm -r $CODIR > /dev/null 2>&1
 	
-	msg_result
-	
+	msg_result	
 fi
 
 if [[ $NOTHING == true ]]; then





More information about the icinga-checkins mailing list