added and if instruction

This commit is contained in:
Daniel Sosnowski
2025-12-04 14:58:15 +01:00
parent 892593ebe2
commit 1f02319909

View File

@@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
function loopDirs {
}
declare -i diskUsage declare -i diskUsage
vhostDir="/var/www/vhosts" vhostDir="/var/www/vhosts"
@@ -21,6 +25,9 @@ then
do do
for path in "$subscription/httpdocs/shopsystem/application/cache/boxes"* "$subscription/httpdocs/shopsystem/appcation/cache/smarty_compiled" for path in "$subscription/httpdocs/shopsystem/application/cache/boxes"* "$subscription/httpdocs/shopsystem/appcation/cache/smarty_compiled"
do do
if [[ -d $path ]]
then
cd "$path" cd "$path"
echo -e "Czyszczę cache w subskrybcji $subscription...\n" echo -e "Czyszczę cache w subskrybcji $subscription...\n"
ls -1 > "/tmp/dirList.txt" ls -1 > "/tmp/dirList.txt"
@@ -35,10 +42,10 @@ then
cd .. cd ..
fi fi
done done
fi
cd "$vhostDir" cd "$vhostDir"
done done
done done
fi fi
if [[ -f "/tmp/subscriptions.txt" ]] && [[ -f "/tmp/dirList.txt" ]] if [[ -f "/tmp/subscriptions.txt" ]] && [[ -f "/tmp/dirList.txt" ]]