[icinga-checkins] icinga.org: icinga-web/master: bin/clearcache. sh now honors changed --with-cache-dir location #1904

git at icinga.org git at icinga.org
Wed Nov 16 17:10:15 CET 2011


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Tue Nov 15 14:45:15 2011 +0100

bin/clearcache.sh now honors changed --with-cache-dir location #1904

using newly introduced configure variables, works fine.

fixes #1904

---

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

diff --git a/bin/clearcache.sh.in b/bin/clearcache.sh.in
index 3a7a467..60d29d6 100644
--- a/bin/clearcache.sh.in
+++ b/bin/clearcache.sh.in
@@ -1,6 +1,7 @@
 #!/bin/bash
 
 PREFIX='@prefix@'
+CACHEDIR='@web_cache_dir@'
 EXIT=0
 NOTHING=true
 
@@ -30,9 +31,9 @@ if [[ ! -e $PREFIX ]]; then
 	exit 1
 fi
 
-echo "Basedir: $PREFIX"
+echo "Basedir: $PREFIX Cachedir: $CACHEDIR"
 
-CCDIR="$PREFIX/app/cache/config $PREFIX/app/cache/content $PREFIX/app/cache/CronkTemplates $PREFIX/app/cache/Squished"
+CCDIR="$CACHEDIR/config $CACHEDIR/content $CACHEDIR/CronkTemplates $CACHEDIR/Squished"
 
 for CUR_CDIR in $CCDIR; do
 	CC_FILES=$(ls $CUR_CDIR/* 2>/dev/null | wc -l)
@@ -41,11 +42,11 @@ for CUR_CDIR in $CCDIR; do
 		CUR_CNAME=$(basename $CUR_CDIR)
 
 		msg_start "Deleting cache from $CUR_CNAME ($CC_FILES files)"
-		
+
 		rm $CUR_CDIR/* > /dev/null 2>&1
-		
+
 		msg_result
-		
+
 	fi
 done
 





More information about the icinga-checkins mailing list