diff --git a/clearCache.sh b/clearCache.sh index 2b4fa8b..6930b17 100644 --- a/clearCache.sh +++ b/clearCache.sh @@ -19,7 +19,14 @@ then for subscription in "${subscriptionList[@]}" do - cd "$subscription/httpdocs/shopsystem/application/cache/boxes" + + if [[ -d "$subscription/httpdocs/shopsystem/application/cache/boxes" ]] + then + cd "$subscription/httpdocs/shopsystem/application/cache/boxes" + elif [[ -d "$subscription/httpdocs/shopsystem/application/cache/smarty_compiled" ]] + then + cd "$subscription/httpdocs/shopsystem/application/cache/smarty_compiled" + fi echo -e "CzyszczÄ™ cache w subskrybcji $subscription...\n" ls -1 > "/tmp/dirList.txt" readarray -t dirList < /tmp/dirList.txt @@ -41,4 +48,4 @@ fi if [[ -f "/tmp/subscriptions.txt" ]] && [[ -f "/tmp/dirList.txt" ]] then rm -r "/tmp/subscriptions.txt" "/tmp/dirList.txt" -fi \ No newline at end of file +fi