added and if instruction
This commit is contained in:
@@ -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" ]]
|
||||||
|
|||||||
Reference in New Issue
Block a user