added if checks for system paths
This commit is contained in:
@@ -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
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user