This commit is contained in:
Daniel Sosnowski
2025-12-02 16:19:43 +01:00
parent 1f47357435
commit 3b5e115675

View File

@@ -3,7 +3,7 @@
declare -i diskUsage
vhostDir="/var/www/vhosts"
diskUsage=$(df -h | grep /dev/mapper/tulup--vg-root | awk '{print $5}' | cut -d% -f1)
diskUsage=$(df -h | grep /dev/mapper/Fabricsy--vg-root | awk '{print $5}' | cut -d% -f1)
if [[ $diskUsage -ge 50 ]]
then
@@ -20,13 +20,10 @@ then
for subscription in "${subscriptionList[@]}"
do
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
if [[ -d "$subscription/httpdocs/shopsystem/application/cache/boxes" ]]
then
cd "$subscription/httpdocs/shopsystem/application/cache/boxes"
fi
echo -e "Czyszczę cache w subskrybcji $subscription...\n"
ls -1 > "/tmp/dirList.txt"
readarray -t dirList < /tmp/dirList.txt