From d1d388297f5c24a875e3ba3164d86ce5cbd91439 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Mon, 9 Sep 2013 00:47:38 +0200 Subject: [PATCH] Added eZ Publish maintenance scripts. --- clear-all-ezcache.sh | 25 +++++++++++++++++++++++++ findinini | 3 +++ whichini | 3 +++ 3 files changed, 31 insertions(+) create mode 100755 clear-all-ezcache.sh create mode 100755 findinini create mode 100755 whichini diff --git a/clear-all-ezcache.sh b/clear-all-ezcache.sh new file mode 100755 index 0000000..a5dbbce --- /dev/null +++ b/clear-all-ezcache.sh @@ -0,0 +1,25 @@ +#!/bin/sh +df -h | grep sda +for ezc in /var/www/projects/*/*?/bin/php/ezcache.php /var/www/projects/*/*/bin/php/ezcache.php; do + EZ_BIN=`dirname \`dirname "$ezc"\`` + EZ_ROOT=`dirname "$EZ_BIN"` + STAMP=`date` + echo "$STAMP - Found eZ4: $EZ_ROOT" + cd "$EZ_ROOT" + /usr/bin/php bin/php/ezcache.php --clear-all -q --purge + cd - +done +for ezc in /var/www/projects/*/ezpublish/console /var/www/projects/*/*/ezpublish/console; do + EZ_ROOT=`dirname \`dirname "$ezc"\`` + STAMP=`date` + echo "$STAMP - Found eZ5: $EZ_ROOT" + cd "$EZ_ROOT" + for env in ezpublish/cache/*; do + ENV=`basename "$env"` + echo "Cleaning Environment $ENV..." + /usr/bin/php ezpublish/console cache:clear --no-ansi --no-interaction --env=$ENV + done + cd - +done +df -h | grep sda + diff --git a/findinini b/findinini new file mode 100755 index 0000000..90abcf8 --- /dev/null +++ b/findinini @@ -0,0 +1,3 @@ +#!/bin/bash +grep $* -R extension/*/settings/ settings/ --include="*.ini" --include="*.ini.append.php" --color=auto + diff --git a/whichini b/whichini new file mode 100755 index 0000000..3e2321b --- /dev/null +++ b/whichini @@ -0,0 +1,3 @@ +#!/bin/sh +find -L extension/*/settings settings \( -iname "$1.ini" -o -iname "$1.ini.append.php" \) -not -path "*/.svn/*" +